SaveRedlineComparisonPDF

Document comparison

Description

Compares the selected document against a baseline PDF at the word level and writes a visual redline comparison PDF containing green underline annotations for insertions and red strikethrough callouts for deletions

Syntax

Delphi

Function TPDFlib.SaveRedlineComparisonPDF(Const BaselineFileName, BaselinePassword, OutputFileName: WideString): Integer; Virtual;

Parameters

BaselineFileNamePath to the baseline PDF file to compare against
BaselinePasswordOpen password for the baseline PDF, or empty string
OutputFileNameDestination file path for the generated redline PDF

Return values

1The redline comparison PDF was generated and saved to OutputFileName
0The baseline document could not be loaded or the output file could not be written

Remarks

Computes a Longest Common Subsequence (LCS) alignment over extracted word bounding boxes on each page and records each insertion or deletion both as a visual overlay and as a standard PDF markup annotation

See also

SaveTextComparisonPDF, SaveVisualComparisonPDF, CompareWith