setPaperSize

Set the PostScript paper size.
setPaperSize([in] int width, [in] int height)
This function sets the paper size for PostScript output. The paper size is specified as a width and height, in PostScript points (one point = 1/72 inch = 0.353 mm).

PDF pages which are larger than the specified paper type will be scaled down to fit.

This setting is global, i.e., it affects all XpdfPS objects (in the same process).

VB:
' same as pdf.paperType = "A4" pdf.setPaperSize 595, 842
paperType