CompareDocumentVisualsWith
Document comparison, Rendering
Description
Align and compare document page images
Syntax
Function TPDFlib.CompareDocumentVisualsWith(Other: TPDFlib; DPI: Double;
Const Options: TPDFVisualCompareOptions): WideString;Remarks
Returns JSON with status=complete, page counts, changed/added/removed/unchanged counts, and ordered page pairs; operation failures return status=error and complete=false without a partial success report
Page pairing uses a bounded longest common subsequence of exact visible-pixel fingerprints, including image dimensions; identical pages anchor inserted and removed pages, and unmatched gaps are paired in order
Pair kinds are unchanged, changed, added, removed, and size_changed; a zero page number indicates an absent page in that input
Repeated identical pages and rewritten gaps can have ambiguous correspondence; the reported alignment describes the deterministic image-based algorithm rather than semantic page identity
Channel tolerance and ignored regions affect paired pixel comparisons; anchors use exact fingerprints before those options are applied
Both documents retain their selected pages; at most 8192 combined pages and 4M alignment matrix cells are accepted
JSON contains comparison measurements and regions, while mask and overlay requests are ignored for this document report; use CompareRenderedPagesWith for binary artifacts from a selected pair