Get started
PDF paper sizes guide: A4, Letter, Legal dimensions in points, mm, inches and pixels

PDF paper sizes guide: A4, Letter, Legal dimensions in points, mm, inches and pixels

PDF page size reference: A4, Letter, Legal and full A-series dimensions in points, mm, inches and pixels, plus how to set the page size in HTML to PDF.

10 min read

PDF page size is measured in PostScript points, where one point equals 1/72 inch. An A4 page is 595 by 842 points (210 by 297 mm); US Letter is 612 by 792 points (8.5 by 11 inches). This guide lists every standard PDF paper size in points, millimeters, inches, and pixels, explains how the A series and US sizes relate, and shows how to set the page size when you generate a PDF from HTML.

What are the standard PDF page sizes?

The most common PDF page sizes are A4 and US Letter. A4 (595 by 842 points) is the ISO standard used everywhere except North America; Letter (612 by 792 points) is the default in the United States and Canada. Both are close in size but not interchangeable: A4 is narrower and taller.

Inside a PDF, the page size lives in the MediaBox of each page object, stored in points. A point is 1/72 inch, the native PDF unit defined by the PDF specification (ISO 32000). Points are resolution-independent, so a 595 by 842 page is A4 whether it is viewed on screen or printed at 300 DPI.

This table covers the sizes you will meet most often, in all four units. Pixel values use 96 DPI, the CSS reference pixel that browsers assume.

SizePoints (w × h)MillimetersInchesPixels @ 96 DPI
A4595 × 842210 × 2978.27 × 11.69794 × 1123
US Letter612 × 792216 × 2798.5 × 11816 × 1056
US Legal612 × 1008216 × 3568.5 × 14816 × 1344
A3842 × 1191297 × 42011.69 × 16.541123 × 1587
A5420 × 595148 × 2105.83 × 8.27559 × 794
Tabloid / Ledger792 × 1224279 × 43211 × 171056 × 1632
Executive522 × 756184 × 2677.25 × 10.5696 × 1008

All values are portrait orientation. For landscape, swap width and height.

The ISO A series, explained

The A series is defined by ISO 216 and is built on one rule: A0 has an area of exactly one square meter, and each smaller size is the previous one cut in half across its longer side. A5 is half of A4, A4 is half of A3, all the way up to A0.

Every A size keeps the same aspect ratio of 1 to the square root of 2 (about 1.414). That ratio is what makes the halving work without distortion: fold any A sheet in half and you get the next size down with identical proportions. This is why scaling a layout from A4 to A3 or A5 never stretches it.

The practical consequence for PDF generation: if your document looks right on A4, it will look right on any A size with no layout changes, only a scale factor. Mixing the A series with US sizes does not share this property, because Letter and Legal use a different aspect ratio.

SizePoints (w × h)MillimetersTypical use
A02384 × 3370841 × 1189Posters, engineering drawings
A11684 × 2384594 × 841Posters, technical plans
A21191 × 1684420 × 594Drawings, large charts
A3842 × 1191297 × 420Spreadsheets, two-up A4
A4595 × 842210 × 297Documents, letters, reports
A5420 × 595148 × 210Booklets, flyers, notebooks
A6298 × 420105 × 148Postcards, tickets

North American paper sizes

The United States, Canada, and parts of Latin America use the ANSI and "loose" sizes rather than the A series. Letter is the everyday default; Legal is for contracts; Tabloid is the two-up Letter size used for newspapers and large tables.

Unlike the A series, US sizes do not share a single aspect ratio, so scaling between them changes proportions. Letter is 1.29 to 1, Legal is 1.65 to 1, Tabloid is 1.55 to 1. A layout built for Letter will not map cleanly onto Legal without reflow.

SizePoints (w × h)InchesMillimetersTypical use
Letter612 × 7928.5 × 11216 × 279Default US document
Legal612 × 10088.5 × 14216 × 356Contracts, legal filings
Tabloid / Ledger792 × 122411 × 17279 × 432Newspapers, wide tables
Executive522 × 7567.25 × 10.5184 × 267Letterhead, memos
Half Letter / Statement396 × 6125.5 × 8.5140 × 216Notepads, booklets

A4 versus Letter: which should you use?

Use A4 if your audience is outside North America, and Letter if it is inside the United States or Canada. This single decision prevents most printing problems, because printers load one default paper tray and scale anything that does not match.

A4 and Letter differ by 17 points in width (A4 is narrower) and 50 points in height (A4 is taller). That gap is enough to push a tightly laid out table off the edge or add a blank strip when the wrong size is printed.

FactorA4US Letter
Dimensions595 × 842 pt612 × 792 pt
RegionWorldwide (ISO 216)US, Canada, Mexico
WidthNarrower by 17 ptWider by 17 pt
HeightTaller by 50 ptShorter by 50 pt
Aspect ratio1 : 1.4141 : 1.294
Safe default forInternational documentsNorth American documents

If a document will be printed in both regions, design the content area to fit inside the smaller common rectangle (595 points wide, 792 points tall) so it prints without clipping on either paper size.

How to set PDF page size from HTML

Set the page size in CSS with the @page rule, then generate the PDF with a headless browser. The @page { size: A4 } rule is read by Chromium and other print engines and takes priority over any format option passed to the rendering library.

CSS accepts named sizes (A4, Letter, Legal) and explicit dimensions (210mm 297mm). Add an orientation keyword for landscape: size: A4 landscape. Always pair the page size with matching @page margins so content does not run to the edge.

/* Named size */
@page {
  size: A4;
  margin: 20mm;
}
 
/* Custom size, portrait */
@page {
  size: 210mm 297mm;
  margin: 15mm 20mm;
}
 
/* Landscape */
@page {
  size: A4 landscape;
}

When you drive the render from code, you can also set the format on the library call. The examples below produce the same A4 output. For the full CSS print model (margins, page breaks, headers), see the CSS print styles for PDF generation guide.

import { chromium } from "playwright";
 
const browser = await chromium.launch();
const page = await browser.newPage();
await page.setContent(html, { waitUntil: "networkidle" });
 
await page.pdf({
  path: "out.pdf",
  format: "A4", // or width: "210mm", height: "297mm"
  printBackground: true,
  margin: { top: "20mm", bottom: "20mm", left: "15mm", right: "15mm" },
});
 
await browser.close();

How to change the page size of an existing PDF

To change the size of a finished PDF, you either rescale the content to fit a new page or re-box the page boundary. Rescaling keeps everything visible at a new physical size; re-boxing changes only the MediaBox, which can crop content that falls outside the new box.

With pdf-lib in JavaScript, page.setSize(width, height) sets new dimensions in points, and page.scaleContent() rescales the drawing to match. Ghostscript does the same from the command line with -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage.

import { PDFDocument } from "pdf-lib";
import fs from "fs";
 
const pdf = await PDFDocument.load(fs.readFileSync("in.pdf"));
const A4 = [595.28, 841.89]; // points
 
for (const page of pdf.getPages()) {
  page.setSize(A4[0], A4[1]);
}
 
fs.writeFileSync("out.pdf", await pdf.save());

For a no-code option, the browser-based resize PDF toolTry it free changes page dimensions in your browser without uploading the file anywhere. To trim margins rather than rescale, the crop PDF toolTry it free adjusts the visible page boundary instead. Both run client-side using pdf-lib, so the document never leaves your machine.

Common page size mistakes

The most frequent mistake is generating a Letter-size PDF for an A4 audience (or the reverse), which forces the printer to scale or clip every page. Set the page size to match the target region before rendering, not after.

A second mistake is setting the page size in two places that disagree, such as @page { size: Letter } in CSS plus format: "A4" in the Playwright call. The CSS @page size wins in Chromium, so the format option is silently ignored. Define the size in one place.

A third is confusing pixels with physical size. Pixel dimensions only mean something with a DPI attached: A4 is 794 pixels wide at 96 DPI but 2480 pixels at 300 DPI. When a design tool exports "A4 at 794 px," it is assuming 96 DPI, which is fine for screen but too low for print. Work in points or millimeters for layout and let the renderer handle pixels.

Do not set an explicit pixel width on the page body when generating a PDF. Browsers map CSS to physical units through the @page rule; a hard-coded width: 794px on body fights the page box and produces unexpected scaling. Size the page with @page, and size content in percentages or millimeters.

Setting the right page size, every time

This works for most documents. Pick the page size for your audience's region, set it once in the @page rule, and keep content inside matching margins. The renderer turns those physical units into correct points in the PDF MediaBox.

At scale, the harder part is not the page size but operating the browser that renders the HTML: keeping a warm Chromium pool, handling concurrency, and avoiding cold starts on serverless. If you would rather not run that infrastructure, the HTML to PDF toolTry it free and the PDF4.dev API render HTML to a correctly sized PDF from a single call, with format and CSS @page both supported. For the code side of HTML rendering, see the Node.js HTML to PDF guide.

Related: CSS print styles for PDF generation · How to resize PDF pages · How to crop a PDF · resize PDFTry it free

Free tools mentioned:

Resize PdfTry it freeCrop PdfTry it freeHtml To PdfTry it free

Start generating PDFs

Build PDF templates with a visual editor. Render them via API from any language in ~300ms.