GroupDocs.Comparison for Python via .NET compares PDF documents and identifies changes in text, formatting, annotations, and structure. Typical use cases include contract review, legal-document comparison, and any workflow where precise difference detection is critical.
The API:
Compares two or more PDF files.
Highlights insertions, deletions, and formatting changes.
Saves the comparison result to a new PDF or any other supported format.
Steps to compare PDF documents
Create a Comparer instance and load the source PDF file.
Text vs. images. By default, PDF comparison detects both text and embedded image changes. For text-only review, disable image comparison — see Disable image comparison in PDF documents. Text-only mode is faster and produces less visual noise when the PDFs differ only in scanned figures or watermarks.
Annotations and form fields. GroupDocs.Comparison detects changes in PDF annotation text and form-field values alongside body text.
Page-level coordinates. Set calculate_coordinates = True on CompareOptions to receive pixel-accurate change locations on each page — useful for overlay UIs. See Get changes coordinates.