(Created on )

Puppeteer: Unknown paper format:

The PDF format does not resolve to a supported paper format.


The PDF format does not resolve to a supported paper format.

Error message

Unknown paper format:

How this error happens

The PDF format option accepts named paper formats. A descriptive label such as poster is not a supported format.

The snippets use an open Puppeteer page named page.

await page.pdf({
    format: "poster",
});

How to fix

Use a supported format such as A4. For custom paper sizes, omit format and supply width and height.

await page.pdf({
    format: "A4",
    printBackground: true,
});

Things to keep in mind

Depending on the PDF option parser, an unknown format may surface as this message or a property-access error. The invalid setting and correction are the same.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →