Skip to main content

borb logo borb

Code style: black Public Method Documentation: 100% Tests: 1400+ Python Versions: 3.10, 3.11, 3.12 Type Checking: 100% Downloads Monthly Downloads

borb is a powerful and flexible Python library for creating and manipulating PDF files.

📖 Overview

borb provides a pure Python solution for PDF document management, allowing users to read, write, and manipulate PDFs. It models PDF files in a JSON-like structure, using nested lists, dictionaries, and primitives (numbers, strings, booleans, etc.). Created and maintained as a solo project, borb prioritizes common PDF use cases for practical and straightforward usage.

✨ Features

Explore borb’s capabilities in the examples repository for practical, real-world applications, including:

  • PDF Metadata Management (reading, editing)
  • Text and Image Extraction
  • Adding Annotations (notes, links)
  • Content Manipulation (adding text, images, tables, lists)
  • Page Layout Management with PageLayout

…and much more!

🚀 Installation

Install borb directly via pip:

pip install borb

To ensure you have the latest version, consider the following commands:

pip uninstall borb
pip install --no-cache borb

👋 Getting Started: Hello World

Create your first PDF in just a few lines of code with borb:

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

# Create an empty Document
d: Document = Document()

# Create an empty Page
p: Page = Page()
d.append_page(p)

# Create a PageLayout
l: PageLayout = SingleColumnLayout(p)

# Add a Paragraph
l.append_layout_element(Paragraph('Hello World!'))

# Write the PDF
PDF.write(what=d, where_to="assets/output.pdf")

🛠 License

borb is dual-licensed under AGPL and a commercial license.

The AGPL (Affero General Public License) is an open-source license, but commercial use cases require a paid license, especially if you intend to:

  • Offer paid PDF services (e.g., PDF generation in cloud applications)
  • Use borb in closed-source projects
  • Distribute borb in any closed-source product

For more information, contact our sales team.

🙏 Acknowledgements

Special thanks to:

  • Aleksander Banasik
  • Benoît Lagae
  • Michael Klink

Your contributions and guidance have been invaluable to borb's development.

Metadata

Release files for borb 3.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for borb 3.0.9
File Size Uploaded
borb-3.0.9.tar.gz 2.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for borb 3.0.9
File Interpreter ABI Platform
borb-3.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 MB

Release files / borb-3.0.9.tar.gz

Download URL borb-3.0.9.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
36671baf34f067f027d68c7b2bc7ee378529575e1ae58e3521400658715fa190
BLAKE2b-256 checksum
How to use checksums
c1fb574079f1aba5e69bd82b72ba8b986fb251c21fa03e515ef9db8624183e11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / borb-3.0.9-py3-none-any.whl

Download URL borb-3.0.9-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cd1038856b054e7e22e4c7218fa70095421437d5159bdb806453bd2c5e044a4f
BLAKE2b-256 checksum
How to use checksums
e3e708fc28188002932da40b565b277e3670aca50ba8f04327f5b675b7388697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

3.0.9 This release

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.24

2 release files

2.1.23

2 release files

2.1.22

2 release files

2.1.21

2 release files

2.1.20

2 release files

2.1.19

2 release files

2.1.18

2 release files

2.1.16

2 release files

2.1.15

2 release files

2.1.13

2 release files

2.1.12

2 release files

2.1.11

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.31

2 release files

2.0.30

2 release files

2.0.28

2 release files

2.0.26

2 release files

2.0.24

2 release files

2.0.22

2 release files

2.0.20

2 release files

2.0.19

2 release files

2.0.18

2 release files

2.0.17

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page