Print the PDF file.
print3([in] VARIANT_BOOL showDialog, [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, [in] int nCopies, [in] BSTR printer, [out, retval] VARIANT_BOOL *success)
This function is an extended version of
printSilently. It prints the currently open PDF file, with various options.
The arguments are:
showDialog: If true,
print3opens the standard print dialog, otherwise it prints to the default printer or to the printer specified in the
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.
nCopies: If nCopies is greater than 0, it specifies the number of copies to be printed. Otherwise, the printer's default setting is used.
printer: The name of the printer to use, or the empty string ("") to use the default printer. If
showDialogis true, the printer argument is ignored.
print3returns true if printing was successful, and false if there was an error.
' this is equivalent to printWithDialog: viewer.print3(True, 1, viewer.numPages, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, "") ' this is equivalent to printSilently: viewer.print3(False, 1, viewer.numPages, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, "")