![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A Python package to compare files (PDF, docx, images) and generate reports in txt, html, or PDF format
PDFCompare
is a Python package designed for comparing multiple file types, including PDF, DOCX, and scanned images. It generates detailed difference reports that can be exported in TXT, HTML, and PDF formats. The package utilizes PyMuPDF
for parsing PDFs, pytesseract
for OCR on images, and python-docx
for DOCX parsing. Additionally, it now includes advanced image preprocessing for improved OCR accuracy using OpenCV.
pytesseract
with advanced preprocessing.OpenCV
for binarization, noise removal, and other image enhancements to improve OCR accuracy.The following external dependencies are required for handling PDF parsing and OCR:
sudo apt-get update
sudo apt-get install tesseract-ocr
If you have Homebrew installed, run:
brew install tesseract
Download the Tesseract installer from the official repository here and follow the installation instructions.
sudo apt-get update
sudo apt-get install wkhtmltopdf
Using Homebrew:
brew install wkhtmltopdf
Download the Windows installer from here and install it.
To install OpenCV for image preprocessing, run:
pip install opencv-python
pdfcompare
PackageOnce all dependencies are installed, you can install pdfcompare
via pip
:
pip install pdfcompare
pdfcompare
provides an intuitive command-line interface for comparing files and generating reports.
pdfcompare file1 file2 --output txt
pdfcompare file1 file2 --output html
pdfcompare file1 file2 --output pdf
pdfcompare document1.pdf document2.docx --output html
This command compares document1.pdf
and document2.docx
, and saves the comparison result as an HTML report.
file1
, file2
: Paths to the files you want to compare.--output
: Specify the format for the report (options: txt
, html
, pdf
).The pdfcompare
package now supports advanced image preprocessing using OpenCV to improve OCR accuracy. This includes steps like binarization, noise removal, and other enhancements before performing text extraction.
pdfcompare
can be used as a Python module within your code.
from pdfcompare.cli import compare_files
file1 = "path/to/file1.pdf"
file2 = "path/to/file2.docx"
output_format = "pdf" # Choose from 'txt', 'html', or 'pdf'
compare_files(file1, file2, output_format)
from pdfcompare.file_handlers.image_handler import extract_text
text = extract_text("path/to/your/image.png")
print(text)
To run unit tests, first install the development dependencies, and then use:
python -m unittest discover tests/
git checkout -b feature/your-feature
).git commit -am 'Add new feature'
).git push origin feature/your-feature
).This project is licensed under the MIT License - see the LICENSE file for details.
extract_text
function for better maintainability.To install the latest version:
pip install pdfcompare --upgrade
FAQs
A Python package to compare files (PDF, docx, images) and generate reports in txt, html, or PDF format
We found that pdfcompare demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.