Set a custom paper width.
[read/write property] customPaperWidth([out, retval] int *w) customPaperWidth([in] int w)
This property sets a custom paper width, in tenths of a millimeter, to be used by printPDF4 and printToJob.

If both customPaperWidth and customPaperHeight are set to non-zero values, they will override the paperID setting. If one or both values are zero, they will be ignored, and paperID 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.

resetParams resets this to its default value of zero.

pdf.customPaperWidth = 1016 ' 101.6 mm = 4 inches pdf.customPaperHeight = 1524 ' 152.4 mm = 6 inches