VpeSetPageWidth

<< Click to Display Table of Contents >>

Navigation:  Layout Functions >

VpeSetPageWidth

Previous pageReturn to chapter overviewNext page

Sets the page width for the current page to a user defined value. Also all newly with PageBreak() added pages will have this width.

void VpeSetPageWidth(

VpeHandle hDoc,

VpeCoord page_width

)

VpeHandle hDoc

Document Handle

VpeCoord page_width

the width of the current page

Default:

21 (21cm = width of VPAPER_A4)

Remarks:

see VpeSetPageFormat()

 

VPE instructs the printer during printing, to switch the paper dimensions automatically according to the page dimensions of the VPE Document's currently printed page. Many printers can react on this and choose automatically the right paper from a different paper input bin. If you want to stop VPE from this automatism, you can specify the flag PRINT_NO_AUTO_PAGE_DIMS for the property PrintOptions.

 

In order to let the printer accept the automatic selection of user defined page formats (i.e. you are not specifying PRINT_NO_AUTO_PAGE_DIMS), it might be necessary to define a form of the desired page format.

Example: with "Start Menu | Settings | Printers" the window with the installed printers will appear. Right-click on a blank area of the window and choose "Server Properties" from the pop-up menu. In the upcoming dialog, define a custom form of the desired dimensions. For example name it "Test" and set the width to 760 and height to 1280.

In your source code, select the printer and the desired page format like this:

VpeSetDevice(hDoc, "Epson LQ-550");

VpeSetPageWidth(hDoc, 7.60);

VpeSetPageHeight(hDoc, 12.80);

That's it.

 

We experienced that this property 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.

 

The page size is freely definable up to 999cm x 999cm.

 

Win 9x / Me: on Win 9x/Me the GDI has 16-bit coordinates, so the dimensions of a page may not exceed 32.7 cm (12.9 inch) when using the version 4 renderer, and 138.7 cm (54.6 inch) when using the version 3 renderer. Those values apply to the preview. For other output devices, e.g. printers, the dimensions of a page may not exceed (32767 / DPI) * 2.54 cm, where DPI = the resolution of the output device.
Example: for a printer with 1200 DPI resolution, the maximum page dimensions may be (32767 / 1200) * 2.54 cm = 69.35 cm.