borb is a Python library for reading, creating, and manipulating PDF files.
The library addresses the need for a pure Python solution to PDF document management by modeling PDF files in a JSON-like structure using nested lists, dictionaries, and primitives. This approach allows developers to work with PDFs through familiar Python data structures rather than low-level PDF operations. The tool supports reading and writing PDFs, extracting text and images, managing metadata, adding annotations like notes and links, and manipulating content through text, images, tables, and lists. Page layout management is handled through a PageLayout component.
The tool suits developers building practical PDF workflows in Python who want straightforward APIs for common use cases. It works well for applications requiring PDF generation, content extraction, or document manipulation without the complexity of lower-level PDF libraries. Adoption requires attention to licensing: the library is dual-licensed under AGPL for open-source use and a commercial license for closed-source projects, paid services, or cloud-based PDF generation. Anyone planning commercial deployment or distribution in proprietary software will need to secure a commercial license.
Development is maintained as a solo project with a focus on practical, straightforward usage for common PDF scenarios. The project maintains an examples repository demonstrating real-world applications of its capabilities.