Click or drag to resize

Custom PDF Page Size

The converter can produce PDF documents with pages of any size. The page size is controlled by the PdfPageSize property of type PdfPageSize. You can set this property to standard values like A4, A3, Letter, etc or to Custom. In this later case, the PDF page size will be given by the CustomPdfPageSize property.

Below, there is a sample code for setting the converter to produce PDF pages with the width of 200 points and height of 300 points. A point is 1/72 inch.

pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.Custom;
pdfConverter.PdfDocumentOptions.CustomPdfPageSize = new SizeF(200, 300);

By default the custom size is set to a width of 595 and a height of 842 points which is the size of the A4 portrait page. When the page orientation is set to landscape the width and height values are inverted.