VpeSetDevPaperWidth

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeSetDevPaperWidth

Previous pageReturn to chapter overviewNext page

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

Sets an individual paper width for the currently selected output device to the specified value. Setting this property does NOT affect the setting of the preview. If you set the width, you should also set the height. If this call is successful, VpeGetDevPaperFormat() returns VPAPER_USER_DEFINED (=0).

int VpeSetDevPaperWidth(

VpeHandle hDoc,

VpeCoord width

)

VpeHandle hDoc

Document Handle

VpeCoord width

the paper width

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 changing the paper width.

 

This property is available for total control. It is only useful if called while processing the VPE_PRINT_NEWPAGE event. Otherwise this property is always overridden by the PageFormat or PageWidth property.

 

We experienced that this option doesn’t work with some printer drivers. We tested this for example on an Epson LQ-550 dot-matrix printer and it didn’t work on WfW 3.11 and NT 3.51, but it worked on Win95. But we heared about, that a LQ-510 printer driver will solve the problem for the LQ-550. So if your printer does not respond to this setting, it is a printer driver problem. In that case you can try to use another compatible printer driver, or see if the printer driver responds to setting the paper size with the property DevPaperFormat to a predefined paper format.

Example:

VpeSetDevPaperWidth(hDoc, 10.5)        // 10.5 cm / inch