pdfPrintSetCustomPaperSize
Set a custom paper size.
void pdfPrintSetCustomPaperSize(PDFHandle pdf, int width, int height)
This function sets a custom paper size, in tenths of a millimeter, to
be used by
pdfPrint4
.
If both width
and height
are set to non-zero
values, they will override the pdfPrintSetPaper
setting. If one
or both values are zero, they will be ignored, and the paper ID will
be used instead.
Note: the custom paper size settings are dependent on the printer driver and the printer itself. XpdfPrint passes the custom width and height to Windows, but there's no guarantee that they will be honored by a particular printer. Different printers may behave differently, e.g., if the specified paper size isn't available in a paper tray.
pdfPrintResetParams
resets the custom paper width and height to
their default values of zero.
C:
/* width = 101.6 mm = 4 inches */
/* height = 152.4 mm = 6 inches */
pdfSetCustomPaperSize(pdf, 1016, 1524);