qmetrics.net

pypdf

Pure-Python library for reading and editing PDF files

pypdf screenshot

pypdf splits, merges, crops, and transforms PDF pages, and can extract text, metadata, images, and attachments.

Overview

pypdf is a pure-Python library for working with PDF documents. You can split and merge files, crop or transform pages, add passwords and viewer options, and read or write document metadata and text.

The user guide covers encryption and decryption, form handling, outlines, annotations, stamps and watermarks, JavaScript in PDFs, streaming IO, size reduction, and PDF/A topics. Reader and writer classes share common document operations, with guidance on strict parsing behavior and security-related warnings.

Optional extra dependencies unlock AES encryption and decryption when installing the crypto extra. For command-line workflows, the separate pdfly tool builds on pypdf to interact with PDFs from a terminal.

Developers pick pypdf when they need programmatic PDF manipulation without tying their project to a heavyweight native stack, staying entirely in Python for parsing and generation tasks.

Key features

  • Split, merge, crop, and transform pages
  • Text and metadata extraction
  • Encryption and decryption support
  • Annotations and form field handling
  • Image and attachment extraction
  • Merge and watermark utilities
  • Streaming read and write
  • Pure Python implementation

Use cases

  • Automated PDF assembly in Python
  • Extracting text or metadata from reports
  • Securing documents with passwords
  • Batch page cropping or rotation
  • Building PDF tooling on top of pdfly

Tags

Similar software

Stirling PDF

Self-hostable open-source PDF editing platform

An open-source PDF platform for editing, signing, converting, and automating documents in the browser, on desktop, or on your own servers with a private API.

★ 97.6k⟳ todayMIT · open core
Open Source Alternative to:Adobe AcrobatFoxit PDF Editor

MinerU

Document parser for Markdown and structured agent output

MinerU converts PDFs, images, and office documents into Markdown and structured JSON for apps, agents, and local workflows.

★ 84.4k⟳ 10 days agoApache-2.0

Paperless-ngx

Community-supported document management system for archiving scanned documents

Paperless-ngx turns physical documents into a searchable online archive. It is deployed with Docker Compose and is the official successor to Paperless and Paperless-ng.

★ 48.7k⟳ yesterdayGPL-3.0

Marker

Document to markdown and JSON conversion toolkit

Marker converts PDFs, images, and Office files into markdown, JSON, chunks, or HTML with layout, tables, math, and optional LLM-assisted cleanup. It runs on GPU, CPU, or Apple MPS via CLI modes.

★ 41.1k⟳ 8 days agoApache-2.0

OCRmyPDF

Command-line OCR text layer for scanned PDFs

OCRmyPDF adds a searchable text layer under scanned PDF images using Tesseract, keeping layout friendly for copy and paste while optimizing file size.

★ 35.4k⟳ yesterdayMPL-2.0

jsPDF

Client-side JavaScript library for generating PDF documents

jsPDF builds PDF files in the browser or in Node.js without a server round trip. It supports pages, fonts, UTF-8 via custom fonts, and optional HTML rendering.

★ 31.3k⟳ 2 months agoMIT