How to compare two PDFs page by page

Choose two PDFs and press Compare PDFs: the two files are rendered in the browser at 1.2× and the renderings of each page number are compared pixel by pixel. Every page gets a card with a badge, the measured difference and a map in which changed pixels are red, and Download difference images packs the same maps into a ZIP, one page-N-difference.png per compared page.

A three-page pair took about 0.6 s in this browser. Two identical files answered 0.00% on all three pages; one extra line of text on page 2 measured 0.38% at the default threshold of 18 and 0.44% at 0; a second file with two pages reported the third page as missing. Twenty pages are compared per run, so a 22-page pair with an empty Pages field stops with the limit message instead of quietly comparing the first twenty.

  1. Choose exactly two PDFs with the picker or the drop zone. Choices add up, so remove a leftover with the × in its row; a file that is not a PDF is refused and the pair you already had stays loaded.
  2. Leave Pages empty to compare the whole pair, or name the pages you need (1,3,5 or 1-12). At most 20 pages are compared per run: if the documents are longer, narrow the range, because an empty field stops with the limit message instead of picking the first pages.
  3. Set the pixel threshold (0-255). A pixel counts as changed when the largest difference between its red, green and blue values is above the threshold, and the default 18 ignores the small shifts that come from anti-aliasing. A blank, negative or over-range entry is corrected in the field itself, so the number shown is the number applied.
  4. Press Compare PDFs and read the cards and the three metrics: pages compared, changed pages and the size of the packed ZIP.
  5. Press Download difference images for the ZIP of maps. Clear empties the list, the cards, the metrics and the packed ZIP.

What the difference map and the measurements mean

What a difference map shows

Each card carries the page number, a badge (Identical, Changed or Page missing), the measured share of pixels and the map. On the map the pixels the two renderings do not share are painted red; the rest is a light grey built from the average brightness of the two pages, so the shape of the document stays visible under the marks. It is a map, not a side-by-side view and not a draggable overlay.

Two identical files measure 0.00% on every page and stay grey. One added line of text measured 0.38% of the page at the default threshold, so the number is the share of the page above the threshold, not a severity score. The threshold decides where the line between same and changed is drawn: at 255 no pixel can pass it, and the report then says 0.00% while the files still differ.

Missing pages, page sizes and page order

Pages are paired by number, not by position: if one file is shorter, the pages that exist only in the longer file come back as Page missing with 100.00%, and the map shows the existing page against a blank canvas. Nothing is padded, inserted or guessed.

Each page is rendered at its own size, so two documents with different page sizes measure about 10.8% on every page that exists, even when they carry the same text. Resize or crop the files first if you need to compare the content alone.

What is not compared

Only the rendering is compared: no text layer, no metadata, no embedded files and no logical structure. A change that leaves the rendering identical (corrected metadata, an added bookmark, a swapped font that looks the same) is not reported, and a change that exists only in the rendering, such as a different zoom at export time, is.

pdf.js renders the pages and JSZip packs the maps, both inside the browser: the two files are not uploaded to VoriTools or anywhere else and are closed when the run ends. Damaged, empty or renamed files are refused with a written message, and encrypted or password-protected PDFs cannot be opened at all.

Recent tools: