VpeSetDevPrintQuality

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeSetDevPrintQuality

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by the Community Edition]

Sets the print quality of the currently selected output device to the specified value or it sets the x-resolution in DPI.

int VpeSetDevPrintQuality(

VpeHandle hDoc,

int quality

)

VpeHandle hDoc

Document Handle

int quality

possible values are:

Constant Name

Value

Comment

VRES_DRAFT

-1

Draft Quality

VRES_LOW

-2

Low Quality

VRES_MEDIUM

-3

Medium Quality

VRES_HIGH

-4

High Quality

 

If a positive value is given, it specifies the number of dots per inch (DPI) for the x-resolution and is therefore device dependent. If you are able to set DevYResolution without error, this property should specify the x-resolution in DPI.

Returns:

Value

Description

True

success

False

failure

Remarks:

In case of an error, LastError is set to VERR_COMMON. An error may occur if the device does not support setting the print quality or x-resolution. You should read this property’s value after setting it, to be sure the value has been accepted. Sometimes the value has not been accepted, but LastError returns no error state (= VERR_OK).

 

We experienced that some drivers do not allow setting the y-resolution, BEFORE the x-resolution had been changed and vice versa. Also some drivers only accept the same values for both resolutions.

Example:

VpeSetDevPrintQuality(hDoc, VRES_DRAFT)        // Draft Mode

VpeSetDevPrintQuality(hDoc, 300)                // 300 DPI