The following commands are used to display the Page Setup and the print Job Setup dialog boxes for the user:
doPageSetup Presents the Page Setup dialog
doJobSetup Presents the Print Job Setup dialog
Calling these routines is optional; if they are not called, the document or print job will be set up with default values.
doPageSetup
Syntax: doPageSetup(document)
Returns: TRUE if the user clicks "OK" in the page setup dialog
FALSE if the user clicks "Cancel" in the page setup dialog
The doPageSetup function displays the Page Setup dialog for a document. This function must be called on an empty document, before any elements are added to it. doPageSetup returns TRUE if the user clicks the "OK" button in the dialog box, or FALSE if the user clicks "Cancel". You can call the getLandscapeMode routine before and after doPageSetup to determine if the user changed the page orientation in the Page Setup dialog box.
doJobSetup
Syntax: doJobSetup(document)
Returns: TRUE if the user clicks "Print" in the job setup dialog
FALSE if the user clicks "Cancel" in the job setup dialog
The doJobSetup function displays the job setup dialog for a PrintOMatic document. This function should be called right before printing. If doJobSetup returns TRUE, the user clicked the "Print" button, and printing should proceed. If doJobSetup returns FALSE, the user clicked "Cancel", and you should not print the document. This function cannot be called on an empty document.
Example:
This is the recommended way of calling doJobSetup right before printing a PrintOMatic document: