Description
PyMuPDF-Utilities is a collection of demos, example scripts and small utilities that show how to build PDF, XPS and eBook applications with the PyMuPDF Python library. Examples are grouped by topic in folders. They cover opening plain text files as documents (supported since PyMuPDF 1.23), so program sources or Markdown can be searched, have text extracted or be rendered like a PDF; OCR using MuPDF OCR, Tesseract and easyocr; advanced table of contents handling; replacing selected fonts in existing PDFs; marking words and lines; and extracting text from boxes. A set of Jupyter notebooks gives more interactive demonstrations of the OCR features. The maintainers note that some scripts date from early versions of the library and may not match later API changes, so they are best used as starting points rather than finished tools.…
Highlights
- Example scripts for PDF, XPS and eBook apps with PyMuPDF
- OCR demos with MuPDF OCR, Tesseract and easyocr
- Table of contents handling examples
- Font replacement scripts for existing PDFs
- Plain-text-as-document and textbox extraction examples
- Jupyter notebook demos
Ratings & Reviews
No ratings yet
Be the first to rate PyMuPDF-Utilities.
People also visit
PyMuPDF-Utilities FAQ
What is in this repository?
Demos and examples that show how to use PyMuPDF to build applications working with PDF, XPS and eBook documents.
Will every script work with the latest PyMuPDF?
Not necessarily. Some were written for early versions and API changes may cause differences; they are meant as examples to get you started.
Are there OCR examples?
Yes, the OCR folder has demos using MuPDF OCR, Tesseract OCR and easyocr, and the jupyter-notebooks folder has more interactive ones.
Can PyMuPDF open plain text files?
Yes, since v1.23 it treats ASCII, UTF-8 or UTF-16 text files as documents you can search, extract from and render. See the text-documents folder.
What are the best PyMuPDF-Utilities alternatives?
Popular alternatives to PyMuPDF-Utilities include MuPDF, PDF-LIB and Pdf2pdfocr. See all PyMuPDF-Utilities alternatives





