Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallPuppeteer can generate PDFs in named paper formats or at custom dimensions. Set format to a documented size such as 'A4' or 'Letter'; use width and height for an unlisted size. If the page’s CSS @page rule should decide the PDF dimensions, set preferCSSPageSize: true.
Which paper sizes does Puppeteer support?
Puppeteer’s PDFOptions.format accepts Letter, Legal, Tabloid, Ledger, and ISO A0 through A6. The following dimensions are the figures in the Puppeteer 25.12.0 PaperFormat reference; the page is an implementation reference, not an independent paper-size standard.
As an Amazon Associate I earn from qualifying purchases.
| Format | Dimensions (inches) | Dimensions (centimeters) |
|---|---|---|
| Letter | 8.5 × 11 | 21.59 × 27.94 |
| Legal | 8.5 × 14 | 21.59 × 35.56 |
| Tabloid | 11 × 17 | 27.94 × 43.18 |
| Ledger | 17 × 11 | 43.18 × 27.94 |
| A0 | 33.1102 × 46.811 | 84.1 × 118.9 |
| A1 | 23.3858 × 33.1102 | 59.4 × 84.1 |
| A2 | 16.5354 × 23.3858 | 42 × 59.4 |
| A3 | 11.6929 × 16.5354 | 29.7 × 42 |
| A4 | 8.2677 × 11.6929 | 21 × 29.7 |
| A5 | 5.8268 × 8.2677 | 14.8 × 21 |
| A6 | 4.1339 × 5.8268 | 10.5 × 14.8 |
Letter is the documented default when no format is supplied. A named format only selects page dimensions; it does not by itself establish printer compatibility, regional suitability, or appropriate margins.
How do you set A4 or another named size?
Pass the format name in the options to page.pdf(). For example, this complete Node.js script uses Puppeteer to save an A4 PDF:
#1 Best Overall
- 1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.pdf({ path: 'page-a4.pdf', format: 'A4' });
} finally {
await browser.close();
}
})();
Replace https://example.com with the page to capture. To choose another listed size, change 'A4' to a documented format such as 'Letter' or 'Legal'.
How do you specify custom PDF dimensions?
Use width and height when the required dimensions are not among the named formats. Each can be a number or a string with a unit. For example, this requests a 7 × 10 inch page:
Rank #2
- HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. Each ream is wrapped in a polyurethane coated paper wrapper to protect the cut sheets from moisture damage
- Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
- HP Copy&Print20 20 pounds printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design)
- All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment; 100% satisfaction guaranteed; ColorLok technology provides more vivid colors, bolder blacks and faster drying
- Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office; HP Copy&Print20 print and copy paper prevents yellowing over time to ensure a long-lasting appearance for added archival quality
await page.pdf({
path: 'custom-size.pdf',
width: '7in',
height: '10in'
});
Using unit-bearing strings makes the intended measurement explicit. If you provide both format and explicit dimensions, format takes priority. Omit format when you want your custom width and height to control the page.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsShould Puppeteer or CSS choose the page size?
Choose one source of truth for dimensions. By default, Puppeteer uses the requested PDF dimensions and scales page content to fit them. Set preferCSSPageSize: true when the page has a CSS @page size that should take priority over width, height, or format.
Rank #3
- 3 ream case (1,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
await page.pdf({
path: 'css-sized.pdf',
format: 'A4',
preferCSSPageSize: true
});
In this example, any applicable CSS @page size takes priority over the A4 option. If you want Puppeteer’s A4 size instead, leave preferCSSPageSize unset or set it to false.
What other PDF settings affect the result?
- Orientation:
landscapedefaults tofalse. Set it totruefor landscape output; this is separate from selecting the named format. - Scale: defaults to
1and accepts values from0.1to2. It changes content scale, not the named format’s reference dimensions. - Margins: default to none. Set margins explicitly if the document needs space at page edges.
- Backgrounds:
printBackgrounddefaults tofalse. Set it totrueif the PDF should include printed background graphics.
Why does the PDF not match the page I see?
- The page is scaled or the size seems ignored: inspect the CSS
@pagerule andpreferCSSPageSize. With CSS sizing preference enabled, the CSS page size takes priority; otherwise Puppeteer fits content to the selected paper size. - Screen-only styles are missing:
page.pdf()uses print CSS media. To render screen media instead, callawait page.emulateMediaType('screen')beforepage.pdf(). - Colors look different: print rendering modifies colors by default. Puppeteer documents the CSS property
-webkit-print-color-adjustfor forcing exact colors where needed. - Custom dimensions are not applied: remove
formatif it is also set; the named format takes priority over explicitwidthandheight.
Or skip the browser setup
If you need a website screenshot rather than a Puppeteer-generated PDF, ScreenshotNeo returns a screenshot or PDF from one GET request. This example requests a PDF:
Quick Recap
Best Value
- 8 ream case (4,000 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
Rank #4
- 5 ream case (2,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -d format=pdf -o page.pdf
See the ScreenshotNeo documentation for request options. It removes known cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server gives AI agents screenshot tools. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Recommended Free Tools
Sign up for ScreenshotNeo’s free plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

