SERVICES
Custom Development Backend & Architecture Service provider analysis Research, analysis & investigationFREE TOOLS
Quote Generator Factur-X Generator SEO Analyzer Dependency Security Checker PDF Comparator PDF / XML ComparatorSERVICES
Custom Development Backend & Architecture Service provider analysis Research, analysis & investigationFREE TOOLS
Quote Generator Factur-X Generator SEO Analyzer Dependency Security Checker PDF Comparator PDF / XML ComparatorPDF Comparator is an open-source tool designed to compare the text content of two PDF files locally in order to quickly identify added or removed lines.
PDF Comparator is a local and open-source tool designed to quickly compare the text content of two PDF files.
It extracts text from both documents, applies light normalization to their content, then displays the differences detected between the two versions.
The goal is to provide a simple way to identify textual changes made to a document without relying on an external platform, API or artificial intelligence system.
pdf-compare.py contains the PDF comparison logic
The pdf-compare.py script extracts the text content
from the pages of both PDF files provided when it is executed.
Light normalization is then applied to the content before comparing the reference document with its new version.
Differences are displayed directly in the terminal as added and removed lines.
If no textual difference is detected, the tool simply indicates this instead of producing an unnecessary report.
Processing is performed locally, without sending files to a third-party service or using an external API, an approach consistent with data security principles.
The demonstration shows the extraction of text from both documents and the identification of added or removed lines between the two versions.
▶ Watch the demonstration on YouTube
The project requires Python 3 and the
pypdf library.
python -m pip install -r requirements.txt
python pdf-compare.py old.pdf new.pdf
The first file is the reference version. The second is the new version to compare.
PDF Comparator compares the text content extracted from the documents. It does not visually compare page rendering, images, fonts, colors or graphical layout.
The quality of the comparison also depends on the text that can actually be extracted from the PDF. A document containing only images or originating from a scan without an exploitable text layer cannot be compared correctly.
The project is open source under the MIT license.
Was this page useful to you?
Thank you for your feedback.