PDFium Delphi Component Docs

RenderDiffOverlay method

Produces a bitmap owned by the caller for a single TPdfPageDifference from CompareWith

function RenderDiffOverlay(Other: TPdf;
  const Difference: TPdfPageDifference;
  const Options: TPdfDocumentDiffOptions): TBitmap;

The selected RenderWidth and RenderHeight determine its size; changed or deleted content is red, inserted content green, and moved pages blue

Visual regions are pixel coordinates from the comparison render; keep its options and input documents unchanged, and release the returned bitmap after displaying or exporting it

The current page selection in each document is restored; invalid indexes or rendering dimensions raise an exception