VpeSetDevPaperHeight

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeSetDevPaperHeight

Previous pageReturn to chapter overviewNext page

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

Sets an individual paper height 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 height, you should also set the width. If this call is successful, VpeGetDevPaperFormat() returns VPAPER_USER_DEFINED (=0).

Setting this property makes sense for tractor printers with endless paper feeders.

int VpeSetDevPaperHeight(

VpeHandle hDoc,

VpeCoord height

)

VpeHandle hDoc

Document Handle

VpeCoord height

the paper height

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 height.

 

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 PageHeight 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:

VpeSetDevPaperHeight(hDoc, 5.8)        // 5.8 cm / inch