bolivar
Fast PDF text and table extraction. Written in Rust, drop-in compatible with pdfminer and pdfplumber.
Install
pip install bolivar
implementation("sa.ingenious:bolivar:<version>")
sa.ingenious/bolivar {:mvn/version "<version>"}
[dependencies]
bolivar-core = "<version>"
Extract text
Pull all text from a PDF in one call. The pdfplumber interface opens the file and iterates pages; the pdfminer interface returns the full text directly. JVM and Rust APIs follow the same pattern with their respective conventions.
Path APIs memory-map the source file. Do not change or replace the file until the operation ends and all documents or cursors that use it are released.
import pdfplumber
with pdfplumber.open("doc.pdf") as pdf:
for page in pdf.pages:
print(page.extract_text())
from pdfminer.high_level import extract_text
text = extract_text("doc.pdf")
import sa.ingenious.pdf.Document;
import sa.ingenious.pdf.DocumentOptions;
var options = DocumentOptions.builder()
.maxPages(1)
.layout(layout -> layout.lineMargin(0.5).wordMargin(0.1))
.build();
String text = Document.extractText("doc.pdf", options);
import sa.ingenious.pdf.extractText
val text = extractText("doc.pdf") {
maxPages = 1
layout {
lineMargin = 0.5
wordMargin = 0.1
}
}
(require '[sa.ingenious.pdf :as pdf])
(def text (pdf/extract-text "doc.pdf"))
use bolivar_core::high_level::extract_text;
fn main() -> bolivar_core::Result<()> {
let data = std::fs::read("doc.pdf")?;
let text = extract_text(&data, None)?;
println!("{text}");
Ok(())
}
Extract tables
Detect and extract tabular data from each page. JVM table APIs return a closeable, single-pass cursor. Close the cursor to stop work early and release its native state.
Each open cursor has a fixed 50-page window. Those pages include active work and completed results that wait for an earlier page. Several open cursors have separate bounded windows. Close signals cooperative cancellation; active page work stops at its next checkpoint.
import pdfplumber
with pdfplumber.open("doc.pdf") as pdf:
for page in pdf.pages:
for table in page.extract_tables():
print(table)
import sa.ingenious.pdf.Document;
import sa.ingenious.pdf.DocumentOptions;
var options = DocumentOptions.builder().pages(1, 2).build();
try (Document doc = Document.open("doc.pdf", options);
var tables = doc.tables()) {
for (var table : tables) {
System.out.println(table.rowCount() + "x" + table.columnCount());
}
}
import sa.ingenious.pdf.openDocument
val doc = openDocument("doc.pdf") {
pages(1, 2)
}
doc.use {
it.tables().use { tables ->
for (table in tables) {
println("${table.rowCount}x${table.columnCount}")
}
}
}
(require '[sa.ingenious.pdf :as pdf])
(with-open [doc (pdf/open "doc.pdf" {:pages [1 2]})
tables (pdf/tables doc)]
(doseq [table tables]
(println (:row-count table) "x" (:column-count table))))
use bolivar_core::high_level::{extract_tables_with_document, ExtractOptions};
use bolivar_core::pdfdocument::PDFDocument;
use bolivar_core::table::TableSettings;
fn main() -> bolivar_core::Result<()> {
let data = std::fs::read("doc.pdf")?;
let doc = PDFDocument::new(&data, "")?;
let tables = extract_tables_with_document(
&doc,
ExtractOptions::default(),
&TableSettings::default(),
)?;
Ok(())
}
Iterate pages
Walk through pages one at a time to read metadata like page number, dimensions, and a text preview. This is useful when you need to locate content across a large document before extracting specific pages.
import pdfplumber
with pdfplumber.open("doc.pdf") as pdf:
for page in pdf.pages:
print(page.page_number, page.width, page.height)
from pdfminer.high_level import extract_pages
for page in extract_pages("doc.pdf"):
print(page.pageid, page.width, page.height)
import sa.ingenious.pdf.Document;
import sa.ingenious.pdf.DocumentOptions;
var options = DocumentOptions.builder().maxPages(3).build();
try (Document doc = Document.open("doc.pdf", options);
var pages = doc.pageSummaries()) {
for (var page : pages) {
System.out.println(page.pageNumber() + ": " + page.text().substring(0, Math.min(80, page.text().length())));
}
}
import sa.ingenious.pdf.openDocument
val doc = openDocument("doc.pdf") {
maxPages = 3
}
doc.use {
it.pageSummaries().use { pages ->
for (page in pages) {
println("${page.pageNumber}: ${page.text.take(80)}")
}
}
}
(require '[sa.ingenious.pdf :as pdf])
(with-open [doc (pdf/open "doc.pdf" {:max-pages 3})
pages (pdf/page-summaries doc)]
(doseq [page pages]
(println (:page-number page) (subs (:text page) 0 (min 80 (count (:text page)))))))
use bolivar_core::high_level::extract_pages;
fn main() -> bolivar_core::Result<()> {
let data = std::fs::read("doc.pdf")?;
for page in extract_pages(&data, None)? {
let page = page?;
println!("{}", page.pageid);
}
Ok(())
}
Async (Python)
Run extraction off the main thread in Python while keeping the same pdfplumber API.
import pdfplumber
async with pdfplumber.open("doc.pdf") as pdf:
for page in pdf.pages:
for table in page.extract_tables():
print(table)
License
MIT
Metadata
Release files for bolivar 2.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bolivar-2.3.1.tar.gz | 5.8 MB | With provenance | Details for bolivar-2.3.1.tar.gz |
Built distributions (wheels)
Total release size: 51.5 MB
Release files / bolivar-2.3.1.tar.gz
| Download URL | bolivar-2.3.1.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea40eb83bf5e98ae83a101b935ea0eaa253a67ca95dcc7b80f678b1643d64ff8
|
|
BLAKE2b-256 checksum How to use checksums |
0da248e088160956262cd91caf58f861e5962ef9b76b4c10023d9720ec0e454c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-win_amd64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9f849f53dbfe3fde185ec9c65a7c95f10c8e3891c496908919ae2e93caa7aca3
|
|
BLAKE2b-256 checksum How to use checksums |
db9a46b68599039fd5dccd5f16fbdffdb40147dced58ae8830712b3588398667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
748e748c853d22901a148ca2e1cc634da2de38ede2007a6b5497463e558c32c8
|
|
BLAKE2b-256 checksum How to use checksums |
22182cb7dd00205c1b087dcb8c1726cb347127e2ba2e1fd4152b4718a698db09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-musllinux_1_2_aarch64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
2114c1aee668ec14bcdb1df86192208daff41d19d3a8515cff59282caf2670d3
|
|
BLAKE2b-256 checksum How to use checksums |
eee2fde0f853cc36c769cca0241209e14eceb96dd26169fbebadd21a75033bc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d3fc3ceb1625281259bca75b36fac4af92262f9e91d0c6c6b3b91c1ebf0a470f
|
|
BLAKE2b-256 checksum How to use checksums |
11d57b30f87a5f234534156c5d8448bacafad6f26135680020a1a83acb89bd4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
b5385b7b9053813026f3305e29abd5db837aa500820fedc6e46d1c8d068659c0
|
|
BLAKE2b-256 checksum How to use checksums |
f8ae08eb2ad8ba7e862474937d4e74f71a1da665888e7f317956628a940454ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6c058b7a645270f53cbeff66d25b35d768acd89f627637cb7fb322d5a2405c5c
|
|
BLAKE2b-256 checksum How to use checksums |
f3f8f83be392a7709c1b1a88a7465e5499e5dcae9d756058b6ef5e204124dc3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp314-cp314t-macosx_10_12_x86_64.whl
| Download URL | bolivar-2.3.1-cp314-cp314t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c67fd629a1cc2f6f8bb71e8567dcf7c58fd56a38c2630d08dd432534ec897622
|
|
BLAKE2b-256 checksum How to use checksums |
94b58d7c909170e1aa3f0539a92c4f0e60b06b81e0beeabdc46a7502415ce1e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-win_amd64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
00d5a48591f38aae6701db0e4635bdfae8dd753cd04b534bdea169122d60463c
|
|
BLAKE2b-256 checksum How to use checksums |
fd4ba6d94f9e2e380a7d4ca99bc487cf0d2606fba3e2d6c790bd8d3c77d88819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aa9222a31c359d71418012cb98a8ca04740bce1b1b1af349cb2d1a5853d6d522
|
|
BLAKE2b-256 checksum How to use checksums |
6b29f963bf038da82b89c5f3dd62e57dc671007feec359ba3978d374369b349f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
edbdb0af818788f942a9e04fadd5455cc44b6b0ab4ea37b31ce0584edaf02750
|
|
BLAKE2b-256 checksum How to use checksums |
350ae21bbd6645f197856706f835f89a14c6d9ea8818a6634b33b3c15f8ab092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6cbcc7a57111117e4c9b8462d767a1d38c8cc605af722a142e4f48b9851caf05
|
|
BLAKE2b-256 checksum How to use checksums |
732696a3dcf3898fcde889461a9a28e428d2b8705a114a7ff4bac09042044192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
98c0133e42ba0ac902e79b16abc17a0f632a7a85e4614e327c0f6aaf5367eb81
|
|
BLAKE2b-256 checksum How to use checksums |
6b302dcb34d6dd2f359b52f4a989c161573c0021eab7d3bbf9c7af6bbe34c2f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9cced8715a858683b365bf46a3923711ef0ae7fb15d7df0841cc03e02a68b903
|
|
BLAKE2b-256 checksum How to use checksums |
433788c069d8cdbcf909974fa5c6b66b52d8335c4d4cd887069d9fa1577b9858
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / bolivar-2.3.1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | bolivar-2.3.1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
427aab3e82b0a495d1825be26517fd895a95aef33a2fe100bf488a5b39ba946d
|
|
BLAKE2b-256 checksum How to use checksums |
78a53bc26fb3ca3c4fac4dc312d8a5ec070889a7f0120070e8fe8c2dcf6cfea5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for bolivar 2.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 15 files in this release have been uploaded with provenance metadata.
Attestation for bolivar-2.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.