Skip to content

mananmaroo/Font_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

FontChange Detector Detect and analyze font changes in PDF documents to identify text styling differences.

πŸ“‹ Project Overview FontChange Detector is a Python-based tool designed to parse PDF documents and identify changes in font styles. This utility can be used to analyze text formatting and ensure consistency or detect styling patterns in professional documents.

πŸš€ Features Detects and highlights changes in font style across a PDF document. Extracts the corresponding text and its associated font metadata. Useful for auditing text styling or debugging PDF formatting issues.

πŸ› οΈ Technologies Used Python: The primary language for the script. PyMuPDF (fitz): To parse PDF files and extract text with font metadata. re (Regular Expressions): For text cleaning and preprocessing.

πŸ—‚οΈ Project Structure Input: A user-provided PDF file. Process: Extract text content from each page using PyMuPDF. Track changes in font style line-by-line. Store detected font changes along with the corresponding text. Output: A list of font changes with page numbers, text, and font details.

πŸ§‘β€πŸ’» How to Use Install Required Library:

pip install PyMuPDF

Prepare the Script:

Save the code as font_change_detector.py.

Replace path_to_your_pdf.pdf with the actual path to your PDF file in the script.

Run the Script:

python font_change_detector.py

View Results: The script will print details of font changes, including the page number, the font style, and the corresponding text.

πŸ› οΈ Potential Enhancements Export results to a CSV or JSON file for better readability. Add visualization to mark font changes directly on the PDF. Support for font size and color detection.

🀝 Contributing Contributions are welcome! Whether it's bug fixes, new features, or optimization, feel free to submit a pull request.

About

It analyses different fonts and let user know where the changes are happening.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages