{"repo":"zyocum/pdf2md","free":true,"listed":false,"github":"https://github.com/zyocum/pdf2md","clone":"git clone https://github.com/zyocum/pdf2md.git","description":"Convert PDF to Markdown via OpenAI multi-modal text/vision model.","language":"Python","stars":38,"topics":["gpt-vision","markdown","openai-api","pdf","poppler"],"license":"MIT","category":"media-processing","readme_excerpt":"pdf2md.py Convert PDF to Markdown via OpenAI's multi-modal text/vision model. Setup OpenAI API Access Acquire an OpenAI API key from here. Add your Open API key to your environment (if it's not defined already): poppler Install poppler for your system (for handling PDF to image conversion). E.g., on macOS via the Homebrew package manager: On Ubuntu/Debian systems: For other Linux distributions, use their respective package managers: - Fedora/RHEL: sudo dnf install poppler-utils - Arch Linux: sudo pacman -S poppler Python Dependencies Then create a virtual environment and install the Python dependencies with uv ( $ pip install uv if you don't have it in your global Python environment): Usage Example You can download an example PDF to convert from here: Output Markdown file: text-and-table.pdf.md If you want to save intermediate PNG images of the PDF pages, use the -c/--cache-pages options (this can speed things up a little bit if you want to rerun a conversion of a large PDF, though OpenAI API rate limits may still be the rate-limiting factor). Known Issues 1. PDFs that contain images cannot be faithfully fully converted since images are not extracted. Headings, lists, paragraphs, code-blocks and other basic markup that is compatible with Markdown should work, though. 2. Each page of the input PDF is processed independently of the others, so it's possible that some context is lost from page to page (e.g., header levels) in multi-page PDFs. As such, adjacent pages may be slight","default_branch":null,"files":null,"tree":[],"storefront":"/r/zyocum","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zyocum/pdf2md/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}