borb is a library for reading, creating and manipulating PDF files in python.
Project description
borb
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
borbin closed-source projects - Distribute
borbin 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file borb-3.0.5.tar.gz.
File metadata
- Download URL: borb-3.0.5.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1faf6d4db405d0ae314e6e2942769d6e61a155659ce20f299c71a51c23d4f787
|
|
| MD5 |
df23b5b89d97fd87e370081d422161e1
|
|
| BLAKE2b-256 |
f6a920998b61ea00f5aabe2ab18b8ffb24f1af84d4b5326526b2a77b5ce001eb
|
File details
Details for the file borb-3.0.5-py3-none-any.whl.
File metadata
- Download URL: borb-3.0.5-py3-none-any.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f67ba813783ad71faeb59f6fba6b24ad5faacf53a59da3e3aa9408fadde3ce19
|
|
| MD5 |
ae47e9d98c7a60cb2ce79cb593fc519c
|
|
| BLAKE2b-256 |
d396fd42afb2ad22b52b10aa8b6447464b3872e2732dc660e4f9324c50cf9991
|