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
| BaselineFileName | Path to the baseline PDF file to compare against |
|---|---|
| BaselinePassword | Open password for the baseline PDF, or empty string |
| OutputFileName | Destination file path for the generated redline PDF |
Return values
| 1 | The redline comparison PDF was generated and saved to OutputFileName |
|---|---|
| 0 | The 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