|
Search:
Advanced search
|
Browse by category:
|
Glossary | Contact Us |
How to set programmatically the page related settings (page size, layout) via novaPDF SDK |
||||
The page related settings have a different behavior than the other settings (save, compression, fonts, security,...). While the last are specific to the novaPDF printer driver
, the page related settings are used for all printer drivers and can be set by system calls (check the DEVMODE Windows structure).
For example, if you start to print a document from an application, you can usually set the page size, page layout, scale and resolution from a Page setup dialog in that specific application. These settings (read from the application that initiates the printing) are shown on the Page tab on novaPDF printer and they are used also when generating the PDF document. To change this behavior and use the specific settings set by the novaPDF printer interface (or novaPDF SDK ) in the registry, you can check the Profile settings override paper settings option from the printing application check box on the Profiles tab. This flag is saved separately for each profile. To change programmatically the flag add the next line: pNova.SetOptionLong2(NOVAPDF_PAPER_OVERRIDE, 1, PROFILE_NAME); But a better approach is to change page settings in this DEVMODE structure, because in this way both the printing application and the printer driver will be informed about this new page. It is better that the application knows this page, so it sends the information formatted to this size. Here is the Hello World C++ sample, modified to set page width and height: HANDLE hPrinter; |
||||


