LLION/ PDF, print & document engineering

PDF inspector

Inspect any PDF in your browser without uploading it: version, cross-reference type, page sizes and boxes, metadata, fonts and embedding, images, encryption.

Runs entirely in your browser

Open a PDF and get the facts a viewer hides: which syntax version it claims, whether it uses a classic cross-reference table or compressed streams, how many revisions it carries, the exact size and page boxes of every page, what the metadata says in both places it can live, which fonts are embedded and which are not, what the images are made of, and how it is encrypted. Everything runs in your browser; nothing leaves your machine.

Typical checks: the page size of every page, named when it matches a standard sheet, before a file goes to print; the file size and the images that account for it, which the compression page explains how to reduce; whether every font is embedded; whether the file was changed after it was first written; and whether it claims PDF/A or PDF/X conformance.

What each section means#

Overview. The version comes from the %PDF- header, overridden by the catalog's /Version entry if that is higher. The cross-reference type tells you whether the file was written in the pre-2003 text form (classic table), the compressed form introduced in PDF 1.5 (cross-reference stream, usually with object streams), or a hybrid that carries both for old readers. The incremental update count is the number of %%EOF markers beyond the first: each one is a revision appended to the file, and earlier revisions are still inside it. The xref page explains why that matters for anything you thought was deleted. A file is reported as linearized when a /Linearized dictionary appears in its first 2 KB; the linearized files section explains the layout.

Pages. Sizes are reported from the CropBox, which is what viewers display, after applying /Rotate. Consecutive pages with identical boxes are grouped. A named size is reported when the page matches a standard sheet within 1.5 mm or 0.6%. The five boxes follow the definitions on the page-boxes page; a dash means the box is absent and defaults to the CropBox.

Metadata. PDFs carry metadata in two places: the Info dictionary referenced from the trailer, and an XMP packet attached to the catalog. Tools disagree about which one wins, so both are shown, with a flag when the titles differ. Conformance claims (PDF/A, PDF/X, PDF/UA) are read from the XMP identifiers; a claim is not a validation, and the standards page lists the validators that check one.

Fonts. Every font referenced from page resources and form XObjects is listed once, with its PDF font type, whether a font program is embedded (FontFile, FontFile2 or FontFile3), whether the name carries the six-letter subset tag, its encoding, and whether a ToUnicode map exists. A font that is not embedded will be substituted on other machines; a font without ToUnicode may extract as nonsense. The fonts page covers both.

Images. Image XObjects are listed by stored pixel size with their colour space, bit depth and compression filter. This is the quickest way to see why a file is large, or whether a print job contains RGB images where CMYK was expected.

Encryption. For encrypted files the inspector reports the security handler, algorithm and permission flags. It does not decrypt, so text metadata is not shown and object streams cannot be opened; page sizes and fonts are still read where the dictionaries are stored directly. Permission flags are advisory, as the encryption page explains.

How it reads the file#

The inspector does not trust the cross-reference table. It scans the whole file for N G obj markers to locate every object, which is the same recovery strategy readers use on damaged files. It then follows startxref only to classify the cross-reference form and to read the trailer dictionaries, expands object streams with the browser's built-in Flate decoder, and walks catalog → page tree → pages → resources. The approach tolerates broken offsets, trailing garbage and truncated files, at the cost of occasionally reporting an unreferenced leftover object.

Limits worth knowing:

  • Files over 200 MB are refused to keep the tab responsive.
  • Object streams compressed with filters other than Flate, ASCII85 or ASCIIHex are skipped, with a note.
  • Inline images inside content streams are not counted, and the printed resolution of images is not computed.
  • Encrypted files are only partially reported.
  • Pages beyond the first 5000 are not examined individually.

To cross-check a result, qpdf gives the same facts from the command line:

Shell
qpdf --check file.pdf
qpdf --show-xref file.pdf
qpdf --json --json-key=pages file.pdf
qpdf --show-encryption file.pdf

The inspector's parser is a few hundred lines of plain JavaScript with no dependencies. It was tested against files written by pdf-lib, headless Chromium and qpdf, including hybrid-reference and incrementally updated files, and against the minimal example on this site.

Sources

LLION Editorial · Updated