Compare documents

callas pdfToolbox Visualizer

The 'Compare documents' feature compares two PDF files. The engine renders these two PDFs and then compares the rendered pixels of these two files. You can set different parameters to affect the comparison result. As result, all differences are displayed in the document using masks.

'Compare documents' is also available on CLI. In this article you can find all command line options.

Let's have a look at the different parameters:

Example files to be compared with each other

  1. Compare: Defines which PDF files should be compared with each other.
  2. Sensitivity: Here you can set, which differences should be highlighted (e. g. minimum sensitivity, maximum sensitivity, no highlighting). These are shortcuts to the more detailed parameters explained in 9 - 11.
  3. Switch documents: Here you can switch between the two PDF files.
  4. Start quick change: This option displays the two document pages alternately, so that the differences are easy to identify.
  5. Resolution (ppi): You can specify the resolution for the rendering (in ppi). The higher the resolution, the more accurate the result (but, of course, the processing time will be longer).
  6. Channels: Here you can select the channel to be compared (e. g. RGB, CMYK, K channel only…). If you want to do a color comparison, you can select "Delta C" or "Delta E" variants.
  7. Highlight: Highlight appearance for the differences.With the default setting "Red mask" the differences are highlighted in red.
  8. Relative to: Here you can specify the area that will be used for rendering.
  9. Per pixel: Sets the threshold for the difference of the compared pixels. The unit depends on the option selected under "Channels" (Possible values: %, dE, dC).
  10. Total area: Threshold in %, that defines how much percent of the area on the page can be different without generating a hit.
  11. Contiguous area (in mm): The engine will only detect a difference if it is larger than the specified value. If you want to find differences only in larger areas, this parameter can help filter out small areas on the page.
  12. Measurements: Values calculated by the engine, which refer to the differences on the page (cannot be adjusted)
  13. Go to next page with differences: When you click on one of the arrows, the engine renders each page, stopping only when a difference is found on a page.
  14. A report can be created from the result, showing the "Compare documents" view and the two PDFS.

Example of a Compare PDF report

Log comparison based information

You can log all comparison-related information. How to do that will be explained in the next article.