pypdfium2
Python bindings to PDFium for reading, parsing and manipulating PDF documents programmatically.
Files, images and media PyPI BSD-3-Clause, Apache-2.0, dependency licenses PDF
How pypdfium2 is used
pypdfium2 is a dependency in 8 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 157 projects, and what it is used with below comes from all of them. The most used alternative in our scan is PyPDF (64 projects). Projects that use it most often also use Pillow (96.8%), Pydantic (93.6%), NumPy (92.4%).
pypdfium2 popularity over time
Gid Score 58: downloads 91, use in agent projects 57, GitHub stars 9, downloads trend 65 (each 0-100). How it is calculated.
Often used with pypdfium2
| Pillow | 96.8% of pypdfium2 projects · 25.3× more than average |
|---|---|
| Pydantic | 93.6% of pypdfium2 projects · 10.8× more than average |
| NumPy | 92.4% of pypdfium2 projects · 15.8× more than average |
| Jinja2 | 90.4% of pypdfium2 projects · 41.6× more than average |
| Click | 89.8% of pypdfium2 projects · 36.0× more than average |
| packaging | 89.8% of pypdfium2 projects · 61.3× more than average |
| charset-normalizer | 89.2% of pypdfium2 projects · 82.6× more than average |
From all 157 projects in our scan that use pypdfium2, including the dependency samples.
By coding agent
| Claude Code | 0.2% of projects set up for it |
|---|
Share of public repos configured for each agent that list pypdfium2 as a dependency.
Project kits that use pypdfium2
PDF tool: compress, merge, split, rotate, stamp and protect (page rendering). A kit is a tested recipe with an AGENTS.md your coding agent builds from, with exact versions and licenses.
Install
| Package | pip install pypdfium2 |
|---|---|
| Main stacks | Python (156), Next.js (1) |
| Example projects | Paper2Poster/Paper2Poster, apconw/Aix-DB, instavm/open-skills, AutoLab-SAI-SJTU/AutoPage, kspviswa/local-packet-whisperer |
Alternatives to pypdfium2
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside pypdfium2 are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| PyPDF pypi Pure-Python library for reading, merging, splitting and transforming PDF files. |
76 | 64 (3.9%) | 38.8M | 10.3K | BSD-3-Clause |
| PyMuPDF pypi High-performance library for PDF extraction, conversion and manipulation. |
72 | 36 (2.2%) | 25.6M | 10.9K | Dual Licensed - GNU AFFERO GPL 3.0 or Artifex Commercial License |
| pdfplumber pypi Extract text, tables and metadata from PDFs with precise character locations. |
68 | 34 (2.1%) | 12.1M | 10.8K | MIT |
| pytesseract pypi Python wrapper for Tesseract OCR to extract text from images and PDFs. |
61 | 33 (2.0%) | 4.4M | 6,395 | Apache-2.0 |
| PyPDF2 pypi Pure Python library for splitting, merging, cropping and transforming PDF files. |
63 | 30 (1.8%) | 3.3M | 10.3K | BSD |
More in Files, images and media: Sharp Pillow Nodemailer jsPDF SheetJS qrcode (JavaScript) JSZip openpyxl