Paper Sizes

When creating a new document or adding a new page to your current document, PDFKit allows you to set the page dimensions. To improve convenience, PDFKit has a number of predefined page sizes. These sizes are based on the most commonly used stndard page sizes.

Predefined Page Sizes

The following predefined sizes are based on the ISO (International) standards. All the dimensions in brackets are in PostScript points.

A-series

B-series

C-series

RA-series

SRA-series

The following predefined sizes are based on the common paper sizes used mainly in the United States of America and Canada. The dimensions in brackets are in PostScript points.

PDFKit supports also the following paper sizes. The dimensions in brackets are in PostScript points.

Setting the page size

In order to use the predefined sizes, the name of the size (as named in the lists above) should be passed to either the PDFDocument constructor or the addPage() function in the size property of the options object, as shown in the example below, using A7 as the preferred size.

// Passing size to the constructor
const doc = new PDFDocument({size: 'A7'});

// Passing size to the addPage function
doc.addPage({size: 'A7'});