A PDF page is not defined by a single size. The PDF specification defines four overlapping rectangular regions — MediaBox, CropBox, TrimBox, and BleedBox — each serving a different purpose in the production and display pipeline. Understanding what each box defines, and when each is used, is essential for anyone working in print production, document exchange, or programmatic PDF manipulation. For most office documents and web PDFs, only the MediaBox matters — it defines the total page extent and is the only box required by the PDF specification. For professional print production, all four boxes are defined and carry specific meaning that printing equipment and imposing software uses to correctly position content on press sheets. This guide covers all four PDF page boxes, the standard paper sizes they are used with, and how to inspect and set them using various tools.

The four PDF page boxes

MediaBox (required) — The MediaBox defines the total physical extent of the page — the page "canvas" in PDF terms. It is the only mandatory page box. All other boxes must be smaller than or equal to the MediaBox. For a standard A4 document intended for screen display only, the MediaBox is the only box needed. Units are in PDF points (1 point = 1/72 inch): A4 MediaBox = [0 0 595.28 841.89]. CropBox — The CropBox defines the region visible when the page is displayed or printed in normal viewing mode. If no CropBox is specified, it defaults to the MediaBox. The CropBox can be smaller than the MediaBox — content in the MediaBox outside the CropBox exists in the file but is clipped from view. This is used for: hiding printer marks and colour bars from end-user view while keeping them in the print file; creating "virtual" crop regions for display while retaining full bleed content. TrimBox — The TrimBox defines the intended finished dimensions of the page after trimming — the actual size of the final document after the press sheets are cut. For an A4 document printed with bleed, the TrimBox is [0 0 595.28 841.89] (the A4 dimensions), while the MediaBox is larger (to accommodate bleed and printer marks). Imposition software and cutting machines use the TrimBox to define where cuts should be made. BleedBox — The BleedBox defines the region to which content extends beyond the TrimBox for bleed. Professional print work requires artwork that extends to the edge of the page to include a bleed margin (typically 3mm) — so that after trimming, there are no white gaps at the edges even with slight misregistration. The BleedBox = TrimBox + bleed on all sides. For A4 with 3mm bleed: BleedBox = [−8.5 −8.5 603.78 850.39] (converting 3mm = 8.5pt). ArtBox — A fifth box, less commonly used. Defines the extent of meaningful content, useful for publisher workflows that place pages in a larger container.

Standard paper sizes in PDF points

PDF uses points (1/72 inch) as the native measurement unit. Common paper sizes: ISO A series: - A0: 2383.94 × 3370.39 pt (841 × 1189 mm) - A1: 1683.78 × 2383.94 pt (594 × 841 mm) - A2: 1190.55 × 1683.78 pt (420 × 594 mm) - A3: 841.89 × 1190.55 pt (297 × 420 mm) - A4: 595.28 × 841.89 pt (210 × 297 mm) - A5: 419.53 × 595.28 pt (148 × 210 mm) - A6: 297.64 × 419.53 pt (105 × 148 mm) North American sizes: - Letter: 612 × 792 pt (8.5 × 11 inches) - Legal: 612 × 1008 pt (8.5 × 14 inches) - Tabloid/Ledger: 792 × 1224 pt (11 × 17 inches) Custom sizes — Any size is valid. The MediaBox simply contains the desired dimensions in points. For a business card PDF (85mm × 55mm): MediaBox = [0 0 240.94 155.91] pt. Converting millimetres to points: multiply by 2.8346 (or divide by 0.3528). UserUnit — PDF 1.6 introduced the /UserUnit dictionary entry on a page, which scales all box coordinates. A /UserUnit of 2 means all box coordinates are in 2-point units. This allows very large pages (architectural drawings, billboard artwork) to be represented without floating-point precision loss. Not all viewers support /UserUnit.

Inspecting and setting page boxes

Inspecting boxes with qpdf: qpdf --json input.pdf | python3 -m json.tool | grep -A4 "box" Or use qpdf --qdf input.pdf output.qdf and inspect the decompressed output. Inspecting boxes with Acrobat Pro: File > Properties > Description shows MediaBox dimensions. For all boxes: View > Show/Hide > Page Thumbnails, then right-click a thumbnail > Page Properties (or Crop Pages dialog in Edit menu). Setting boxes with pdf-lib (JavaScript): page.setMediaBox(0, 0, 595.28, 841.89); page.setTrimBox(0, 0, 595.28, 841.89); page.setBleedBox(-8.5, -8.5, 603.78, 850.39); Setting boxes with pypdf (Python): page.trimbox = RectangleObject([0, 0, 595.28, 841.89]) page.bleedbox = RectangleObject([-8.5, -8.5, 603.78, 850.39]) Crop with Ghostscript: gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dUseCropBox -sOutputFile=cropped.pdf input.pdf PDF/X requirements — PDF/X standards (for print exchange) require that TrimBox and/or BleedBox be defined. PDF/X-1a and PDF/X-3 require TrimBox or ArtBox. PDF/X-4 and PDF/X-6 require TrimBox with BleedBox if bleed is present. See PDF Print Production for the full PDF/X workflow.