skillfed

borb

borb is a library for reading, creating and manipulating PDF files in python.

borb v3.0.9 504.7K downloads/30d#6,296 on PyPI3,569
AGPL license AGPL-3.0-or-later Active released

What it is and what it does

borb is a pure Python library for creating and manipulating PDF documents. It models PDFs using nested lists, dictionaries, and primitives—a JSON-like structure—making it accessible for developers familiar with Python data structures. The library handles reading existing PDFs, writing new ones, and modifying content including text, images, tables, annotations, and page layouts.

The package is maintained as a solo project and prioritizes straightforward, practical PDF workflows. It supports metadata management, text and image extraction, annotation addition, and page layout control through a PageLayout system. With no external runtime dependencies, installation is low-friction, and the library supports Python 3.6 through 3.12.

Use it for:

  • Generate PDF reports or invoices programmatically with text, images, and tables
  • Extract text and metadata from existing PDF files for processing or analysis
  • Add annotations, notes, or links to PDF documents
  • Create templated PDF documents with dynamic content insertion
  • Manipulate page layouts and structure in existing PDFs

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

borb reads, writes, and manipulates PDF files using a pure Python implementation with a JSON-like document model, supporting content creation, metadata management, and page layout.

Yes, if you need straightforward PDF generation or manipulation in pure Python and can accept the AGPL licensing terms (or purchase a commercial license for proprietary use). The library is actively maintained, has no external dependencies, and covers common PDF workflows. Not suitable if your project is closed-source or commercial without a paid license.

Install

borb on PyPI

pip

pip install borb

uv

uv add borb

poetry

poetry add borb

Installing borb

Before you install

Installation is straightforward with no runtime dependencies. The project is actively maintained with a recent release and established community presence (3569 stars).

License in practice

borb is dual-licensed under AGPL-3.0-or-later and a commercial license. AGPL requires source disclosure for networked use; commercial licensing is required for closed-source products, paid PDF services, or proprietary distribution.

Quickstart

from borb.pdf import Document, Page, PageLayout, SingleColumnLayout, Paragraph, PDF

d = Document()
p = Page()
d.append_page(p)
l = SingleColumnLayout(p)
l.append_layout_element(Paragraph('Hello World!'))
PDF.write(what=d, where_to="output.pdf")

Requires Python 3.6 or later; AGPL license restrictions apply to commercial or closed-source use.

Verify before relying

  • Whether the AGPL license applies to your use case (cloud services, closed-source projects, or proprietary distribution require commercial licensing)
  • Performance characteristics and file size limits for large or complex PDF operations
  • Completeness of PDF specification coverage compared to other libraries

Package facts

License AGPL-3.0-or-later (agpl)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 11 days since the last release
Last repo commit
First released
Downloads 504,690/month — #6,296 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: borb-3.0.9-py3-none-any.whl

Keywords: pdf, pdf-generation, pdf-processing, borb

Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Artistic SoftwareTopic :: File FormatsTopic :: MultimediaTopic :: Multimedia :: GraphicsTopic :: Text Processing

Tags

python pdf generationpdf creation librarypdf manipulation pythonread write pdfpdf document processing
pdf-generationdocument-processing

More Text Processing packages