Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The PageWidth, PageHeight, and PageSize parameters are used to set the page height and width for the current printing session. When you want to set the page size to a pre-defined page size, then you must set the PageSize parameter to one of the page size values that is specified in the OIPRINT_EQUATES, and the PageWidth and PageHeight parameters must be NULL. To set the page size to a custom page size, the Get_Printer PAGESIZE message must return the 256 code. Then you can set the PageWidth and PageHeight to any custom page size. If the PageWidth and PageHeight are set, then the PageSize is ignored. For the best results you should set the PageSize parameter equal to an available page size code that was returned by the Get_Printer PAGESIZE message, and set the PageWidth and PageHeight to NULL. Always check the return code from the INIT message, because not all printers support custom page sizes. The PageHeight, PageWidth, and PageSize parameters are dependent on the current printer driver, and not all printer drivers allow custom page sizes. You should always use the most current version of the Windows printer driver. The Get_Printer PAGESIZES message returns all of the available page sizes for the current printer.

...