#  borb
[](https://github.com/psf/black)
[]()
[]()
[]()
[]()
[](https://pepy.tech/project/borb)
[](https://pepy.tech/project/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](https://github.com/jorisschellekens/borb-examples) 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`:
```bash
pip install borb
```
To ensure you have the latest version, consider the following commands:
```bash
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`:
```python
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](https://borbpdf.com/).
## ๐ Acknowledgements
Special thanks to:
- Aleksander Banasik
- Benoรฎt Lagae
- Michael Klink
Your contributions and guidance have been invaluable to `borb`'s development.
Raw data
{
"_id": null,
"home_page": "https://github.com/jorisschellekens/borb",
"name": "borb",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Joris Schellekens",
"author_email": "joris.schellekens.1989@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9a/30/1b89298f55ea770739b9ec34f07560927d9fc1bb9ac1065e889ab3bfdc26/borb-3.0.2.tar.gz",
"platform": null,
"description": "\n#  borb\n\n[](https://github.com/psf/black)\n[]()\n[]()\n[]()\n[]()\n[](https://pepy.tech/project/borb)\n[](https://pepy.tech/project/borb)\n\n`borb` is a powerful and flexible Python library for creating and manipulating PDF files.\n\n## \ud83d\udcd6 Overview\n\n`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.\n\n## \u2728 Features\n\nExplore `borb`\u2019s capabilities in the [examples repository](https://github.com/jorisschellekens/borb-examples) for practical, real-world applications, including:\n\n- PDF Metadata Management (reading, editing)\n- Text and Image Extraction\n- Adding Annotations (notes, links)\n- Content Manipulation (adding text, images, tables, lists)\n- Page Layout Management with `PageLayout`\n\n\u2026and much more!\n\n## \ud83d\ude80 Installation\n\nInstall `borb` directly via `pip`:\n\n```bash\npip install borb\n```\n\nTo ensure you have the latest version, consider the following commands:\n\n```bash\npip uninstall borb\npip install --no-cache borb\n```\n\n## \ud83d\udc4b Getting Started: Hello World\n\nCreate your first PDF in just a few lines of code with `borb`:\n\n```python\nfrom pathlib import Path\nfrom borb.pdf import Document, Page, PageLayout, SingleColumnLayout, Paragraph, PDF\n\n# Create an empty Document\nd: Document = Document()\n\n# Create an empty Page\np: Page = Page()\nd.append_page(p)\n\n# Create a PageLayout\nl: PageLayout = SingleColumnLayout(p)\n\n# Add a Paragraph\nl.append_layout_element(Paragraph('Hello World!'))\n\n# Write the PDF\nPDF.write(what=d, where_to=\"assets/output.pdf\")\n\n```\n\n## \ud83d\udee0 License\n\n`borb` is dual-licensed under AGPL and a commercial license. \n\nThe AGPL (Affero General Public License) is an open-source license, but commercial use cases require a paid license, especially if you intend to:\n\n- Offer paid PDF services (e.g., PDF generation in cloud applications)\n- Use `borb` in closed-source projects\n- Distribute `borb` in any closed-source product\n\nFor more information, [contact our sales team](https://borbpdf.com/).\n\n## \ud83d\ude4f Acknowledgements\n\nSpecial thanks to:\n\n- Aleksander Banasik\n- Beno\u00eet Lagae\n- Michael Klink\n\nYour contributions and guidance have been invaluable to `borb`'s development.\n",
"bugtrack_url": null,
"license": null,
"summary": "borb is a library for reading, creating and manipulating PDF files in python.",
"version": "3.0.2",
"project_urls": {
"Homepage": "https://github.com/jorisschellekens/borb"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "68447794a75f0c9f7b9aea2195f3099a2336be807cadff5d4f11c2dc00090c2e",
"md5": "d5753d73792c973a333f27900b9d4302",
"sha256": "2090715252b3a953eb978c0e951794b78f6e6f9f44d8cac7a26e8c93539d5f9a"
},
"downloads": -1,
"filename": "borb-3.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d5753d73792c973a333f27900b9d4302",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3059578,
"upload_time": "2025-07-12T10:31:01",
"upload_time_iso_8601": "2025-07-12T10:31:01.104811Z",
"url": "https://files.pythonhosted.org/packages/68/44/7794a75f0c9f7b9aea2195f3099a2336be807cadff5d4f11c2dc00090c2e/borb-3.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9a301b89298f55ea770739b9ec34f07560927d9fc1bb9ac1065e889ab3bfdc26",
"md5": "7611de1b1e518250a51e8e13a425d852",
"sha256": "ec520cc3a8d1090a188814139b318b8c6e5136cea50f851cb225a4e6ce1889a5"
},
"downloads": -1,
"filename": "borb-3.0.2.tar.gz",
"has_sig": false,
"md5_digest": "7611de1b1e518250a51e8e13a425d852",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2657668,
"upload_time": "2025-07-12T10:31:02",
"upload_time_iso_8601": "2025-07-12T10:31:02.406286Z",
"url": "https://files.pythonhosted.org/packages/9a/30/1b89298f55ea770739b9ec34f07560927d9fc1bb9ac1065e889ab3bfdc26/borb-3.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-12 10:31:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jorisschellekens",
"github_project": "borb",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "setuptools",
"specs": []
}
],
"lcname": "borb"
}