PyMuPDF4LLM

PyMuPDF4LLM is a lightweight extension for PyMuPDF that turns PDFs into clean, structured data with minimal setup. It includes layout analysis without any GPU requirement.

PyMuPDF4LLM makes it easy to extract document content in the format you need for LLM & RAG environments. It supports structured data extraction to Markdown, JSON and TXT, as well as LlamaIndex and LangChain integration.

API

See: The PyMuPDF4LLM API.

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.