pymupdf/PyMuPDF ? reverse-engineered prompt

Reverse engineered prompt

Build me a fast Python library for working with PDFs and similar documents. I want to be able to open files, extract plain text or richer text with font, size, color, and page position details, detect tables and export them as markdown or structured data, render pages to images at different DPI settings, extract embedded images, add highlights and redactions, merge and split PDFs, and save the results back out.

It should also read common document types like EPUB, XPS, images, text, and markdown, and support Office files as an optional paid add on if that fits. Please add optional OCR through Tesseract for scanned pages, and an easy way to turn documents into clean markdown or JSON that works well for AI and search use cases. Keep it accurate, lightweight, and easy to install as a normal Python package with minimal required dependencies. Include simple examples, basic tests, and clear docs so someone can start using it right away. You can look up current docs online if needed.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab