# Python PDF Libraries

> AI-ranked search results for `best python pdf libraries` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 109 total matches; showing the top 12.

Explore on the web: https://awesome-repositories.com/q/best-python-pdf-libraries

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/best-python-pdf-libraries).**

## Results

- [mstamy2/pypdf2](https://awesome-repositories.com/repository/mstamy2-pypdf2.md) (10,064 ⭐) — PyPDF2 is a pure Python library for reading, writing, and manipulating PDF files. It functions as a document manipulator, text extractor, and encryption tool, allowing users to process PDF files without relying on external C libraries or native binaries.

The library provides specialized tools for modifying document structures, such as merging multiple files into one, splitting documents into separate files, and transforming page layouts through cropping. It also includes capabilities for securing documents via passwords and encryption.

Additional capabilities include the extraction of writte
- [py-pdf/pypdf2](https://awesome-repositories.com/repository/py-pdf-pypdf2.md) (10,094 ⭐) — PyPDF2 is a pure Python library for transforming, securing, and extracting data from PDF documents. It provides a comprehensive suite of tools to modify page layouts, manage document security, and retrieve embedded metadata without relying on external C libraries.

The toolkit enables document assembly through the merging of multiple files and the splitting of documents into smaller parts. It also supports page-level transformations, including the ability to rotate pages and adjust visible crop areas.

The library includes capabilities for security management via password-based encryption and
- [pymupdf/pymupdf](https://awesome-repositories.com/repository/pymupdf-pymupdf.md) (9,086 ⭐) — PyMuPDF is a comprehensive PDF manipulation library and document analysis tool. It serves as a text extraction tool, OCR engine, and image converter, providing a programmatic interface to edit, merge, split, and optimize PDF and Office documents.

The project distinguishes itself through high-performance capabilities, including the use of C-bindings for low-level manipulation and parallelized page processing to accelerate workloads. It provides specialized conversion paths, such as transforming PDF content into Markdown for retrieval-augmented generation and large language model pipelines.

It
- [jsvine/pdfplumber](https://awesome-repositories.com/repository/jsvine-pdfplumber.md) (9,732 ⭐) — pdfplumber is a PDF data extraction library and layout analysis tool used to retrieve text, tables, and geometric objects from PDF files using precise coordinate-based analysis. It functions as a layout analyzer and table parser that identifies the bounding boxes and visual coordinates for every character and image on a page.

The library distinguishes itself through visual debugging capabilities, allowing users to render PDF pages as images and draw annotations to verify the position of extracted data. It employs line and intersection analysis to identify cell structures and convert unstructu
- [jbarlow83/ocrmypdf](https://awesome-repositories.com/repository/jbarlow83-ocrmypdf.md) (33,901 ⭐) — OCRmyPDF is a tool for converting image-based PDF files into machine-readable documents by adding a searchable text layer via optical character recognition. It functions as a multi-language processor capable of detecting and extracting text in over 100 different languages using linguistic data packs.

The software includes a PDF image optimizer to remove image artifacts and correct page skew to improve recognition accuracy. It also provides a converter to transform scanned documents into the PDF/A standard for long-term digital archiving.

The system manages PDF optimization by compressing emb
- [vikparuchuri/marker](https://awesome-repositories.com/repository/vikparuchuri-marker.md) (36,164 ⭐) — Marker is an LLM-powered document parser and OCR pipeline designed to convert PDFs and unstructured files into structured markdown, JSON, and HTML. It functions as a data preprocessor that transforms complex documents into machine-readable formats while preserving tables, equations, and layout structures.

The system utilizes large language models to refine OCR accuracy, clean mathematical notation, and merge fragmented tables across multiple pages. It employs model-based layout analysis to predict block types and bounding boxes, ensuring a more precise conversion of document elements.

Capabi
- [pdfminer/pdfminer.six](https://awesome-repositories.com/repository/pdfminer-pdfminer-six.md) (6,906 ⭐) — pdfminer.six is a programmatic tool for extracting text, layout information, and metadata from PDF documents into machine-readable formats. It functions as a document parser that converts internal PDF objects and structures into accessible data objects for analysis.

The project includes utilities for decrypting RC4 and AES encrypted files to enable content extraction. It also provides a layout analyzer to identify fonts, colors, and text locations to determine the organizational structure of pages.

The system covers a broad range of extraction capabilities, including the retrieval of embedde
- [py-pdf/pypdf](https://awesome-repositories.com/repository/py-pdf-pypdf.md) (9,818 ⭐) — pypdf is a Python library for parsing, manipulating, and generating PDF documents. It provides high-level operations for document processing, such as merging multiple files into one or splitting a single document into smaller files.

The project includes specialized tools for managing interactive elements, including the creation and modification of annotations, hyperlinks, and form fields. It also supports advanced metadata management, allowing for the extraction and modification of standard document properties and XML-based XMP metadata.

Beyond basic structural changes, the library covers pa
- [camelot-dev/camelot](https://awesome-repositories.com/repository/camelot-dev-camelot.md) (3,764 ⭐) — Camelot is a Python library and processing engine designed to extract tabular data from PDF documents. It converts unstructured tables into machine-readable formats such as CSV, JSON, and Excel.

The project provides specialized toolsets for different document types, using line detection for ruled tables and whitespace analysis for borderless tables. It includes an optical character recognition system to recover structured data from image-based scanned PDFs that lack a digital text layer.

The library handles complex document layouts, including encrypted files, rotated pages, and tables that s
- [opendatalab/mineru](https://awesome-repositories.com/repository/opendatalab-mineru.md) (67,734 ⭐) — MinerU is a document parsing pipeline designed to transform unstructured files into machine-readable, structured data. It utilizes deep learning models to perform layout analysis, identifying document regions and extracting complex content such as mathematical expressions. By combining these neural network inferences with geometric heuristics, the system reconstructs the reading order and structural hierarchy of documents to ensure accurate data representation.

The project distinguishes itself through a multi-stage processing workflow that integrates layout detection, optical character recogn
- [docling-project/docling](https://awesome-repositories.com/repository/docling-project-docling.md) (61,674 ⭐) — Docling is a modular framework designed for document parsing, layout analysis, and structured data extraction. It transforms unstructured files and web content into a unified, hierarchical data model that preserves the spatial and semantic relationships between text, tables, images, and layout elements. By normalizing diverse input formats into a consistent internal representation, the library enables uniform processing across various document types.

The project distinguishes itself through a schema-driven approach that maps document regions to strongly-typed objects, ensuring data accuracy t
- [pikepdf/pikepdf](https://awesome-repositories.com/repository/pikepdf-pikepdf.md) (2,744 ⭐) — A Python library for reading and writing PDF, powered by QPDF
