pypdf: A Powerful Pure-Python Library for PDF Manipulation
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
pypdf is a free and open-source pure-Python library designed for comprehensive PDF manipulation. It allows users to split, merge, crop, and transform PDF pages, as well as add custom data, viewing options, and passwords. The library also supports extracting text and metadata from PDF files, making it a versatile tool for various PDF-related tasks.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
pypdf is a robust, pure-Python PDF library that empowers developers to interact with PDF files programmatically. It offers a wide array of functionalities, including splitting, merging, cropping, and transforming pages. Beyond basic manipulation, pypdf can also add custom data, set viewing options, and apply password protection to your PDF documents. Furthermore, it provides capabilities to extract text and metadata, making it an essential tool for automating PDF workflows.
Installation
Getting started with pypdf is straightforward using pip.
pip install pypdf
For advanced features like AES encryption or decryption, you can install additional dependencies:
pip install pypdf[crypto]
Note that pypdf versions 3.1.0 and above include significant improvements. Please refer to the official migration guide for more details.
Examples
Here's a quick example demonstrating how to read a PDF and extract text from its first page:
from pypdf import PdfReader
reader = PdfReader("example.pdf")
number_of_pages = len(reader.pages)
page = reader.pages[0]
text = page.extract_text()
print(f"Number of pages: {number_of_pages}")
print(f"Text from first page: {text[:200]}...") # Print first 200 chars
pypdf supports many other operations, such as splitting, merging, reading and creating annotations, and encryption/decryption. Check out the documentation for additional usage examples!
Why Use pypdf
pypdf stands out as a comprehensive solution for PDF handling in Python due to several key advantages. Its pure-Python implementation ensures broad compatibility and ease of integration into Python projects without external binaries. The library's extensive feature set covers everything from basic page manipulation to advanced tasks like metadata extraction and security. With an active development team and a supportive community, pypdf is continuously improved and well-maintained, offering reliable performance for your PDF processing needs.
Links
- GitHub Repository: https://github.com/py-pdf/pypdf
- Official Documentation: https://pypdf.readthedocs.io/en/stable/
- StackOverflow (Q&A): https://stackoverflow.com/questions/tagged/pypdf
Related repositories
Similar repositories that may be relevant next.

CLI Agent Orchestrator: Multi-Agent Orchestration for AI Coding CLIs
August 24, 2026
The CLI Agent Orchestrator (CAO) is a powerful tool designed to coordinate multiple AI coding CLIs, enabling a supervisor to delegate tasks to specialist agents in parallel or sequence. It achieves this by running a local `cao-server` and launching provider CLIs within isolated tmux terminal sessions. This setup allows for efficient management and orchestration of various AI coding assistants.

Micstec Skills: A Comprehensive Collection for AI Coding Agents
August 21, 2026
Micstec Skills is a centralized GitHub repository offering a vast collection of skills, plugins, and extensions for various AI coding agents. It supports platforms like Claude Code, Gemini CLI, Copilot, and Cursor, providing a unified approach to managing AI agent capabilities. Developers can easily discover, install, and enhance their AI-powered development workflows across multiple environments.

dify-official-plugins: Extending Dify with AI Models, Tools, and Agent Strategies
August 18, 2026
The `dify-official-plugins` repository hosts a collection of official plugins for Dify, an open-source platform for developing LLM-powered AI applications. These plugins, including models, tools, agent strategies, and extensions, enhance Dify's capabilities and are maintained by the official Dify team. They are designed to help developers efficiently build, deploy, and manage AI-driven solutions.

Agent Skills: A Standardized Way to Give AI Agents New Capabilities
August 18, 2026
Agent Skills provides a lightweight, open format for extending AI agent capabilities with specialized knowledge and workflows. It allows packaging procedural knowledge and context into portable, version-controlled folders that agents load on demand. This enables agents to gain domain expertise, follow repeatable workflows, and reuse skills across various compatible AI tools.
Source repository
Open the original repository on GitHub.
10 counted GitHub visits