Add pages to a print job.
printToJob([in] int firstPage, [in] int lastPage, [in] double llx, [in] double lly, [in] double urx, [in] double ury, [in] double xScale, [in] double yScale, [in] double xOffset, [in] double yOffset, [in] int rotate)
This function adds page(s) to the current print job (which was started by a call to
startPrintJob). You can load a different PDF file before each
printToJobcall, and/or change the parameters passed to each
The arguments are:
firstPage, lastPage: The range of pages to print. If
showDialogis true, this will be used as the default page range in the dialog.
llx, lly, urx, ury: The lower-left (
llx, lly) and upper-right (
urx, ury) corners of the region of the page to be printed, measured in PDF coordinates. To specify a region, llx must be less than urx, and lly must be less than ury; otherwise, the whole page is printed. (Pass
0, 0, -1, -1to print the whole page.)
xScale, yScale: The horizontal and vertical scale factors, where 1.0 means actual size. If either value is less than or equal to zero, they are both ignored, and the page is printed actual size, or shrunk to fit the paper if necessary. (Pass
-1, -1to use the default scaling.)
xOffset, yOffset: The offset of the printed region from the lower-left corner of the page, measured in points (1 point = 1/72 inch). If either one is less than zero, the page is instead centered on the paper. (Pass
-1, -1to get the default behavior of centering the page.)
rotate: The rotation angle (0, 90, 180, or 270 degrees). If rotate is less than 0, the page will be printed at 0 or 90 degrees rotation (portrait or landscape), depending on its size relative to the paper size.
' start the print job, setting parameters that apply to ' the whole job viewer.startPrintJob(False, 1, "LaserJet") ' set parameters that apply to the next part of the print job viewer.loadFile("file1.pdf") viewer.printToJob(1, 3, 0, 0, -1, -1, -1, -1, -1, -1, -1) ' set parameters for the next part of the print job viewer.loadFile("file2.pdf") viewer.printToJob(1, 3, 0, 0, -1, -1, -1, -1, -1, -1, 90) ... ' finish the print job viewer.finishPrintJob()