Skip to main content

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:1.2.0")
sa.ingenious/bolivar {:mvn/version "1.2.0"}
[dependencies]
bolivar-core = "1.2"

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.

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. Bolivar returns structured tables with row and column counts, bounding boxes, and cell text so you can inspect or export them without manual parsing.

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)) {
    for (var table : doc.extractTables()) {
        System.out.println(table.rowCount() + "x" + table.columnCount());
    }
}
import sa.ingenious.pdf.openDocument

val doc = openDocument("doc.pdf") {
    pages(1, 2)
}
doc.use {
    for (table in it.extractTables()) {
        println("${table.rowCount}x${table.columnCount}")
    }
}
(require '[sa.ingenious.pdf :as pdf])

(with-open [doc (pdf/open "doc.pdf" {:pages [1 2]})]
  (doseq [table (pdf/tables doc)]
    (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)) {
    for (var page : doc.extractPageSummaries()) {
        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 {
    for (page in it.extractPageSummaries()) {
        println("${page.pageNumber}: ${page.text.take(80)}")
    }
}
(require '[sa.ingenious.pdf :as pdf])

(with-open [doc (pdf/open "doc.pdf" {:max-pages 3})]
  (doseq [page (pdf/page-summaries doc)]
    (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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bolivar-1.9.1.tar.gz (5.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bolivar-1.9.1-cp314-cp314t-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.14tWindows x86-64

bolivar-1.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

bolivar-1.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

bolivar-1.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

bolivar-1.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

bolivar-1.9.1-cp314-cp314t-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

bolivar-1.9.1-cp314-cp314t-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

bolivar-1.9.1-cp311-abi3-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

bolivar-1.9.1-cp311-abi3-musllinux_1_2_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

bolivar-1.9.1-cp311-abi3-musllinux_1_2_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

bolivar-1.9.1-cp311-abi3-manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

bolivar-1.9.1-cp311-abi3-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

bolivar-1.9.1-cp311-abi3-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

bolivar-1.9.1-cp311-abi3-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file bolivar-1.9.1.tar.gz.

File metadata

  • Download URL: bolivar-1.9.1.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bolivar-1.9.1.tar.gz
Algorithm Hash digest
SHA256 5c8fa9ac53f98da90a514c4361672acc532dcef96413f2ba5c7836c7ecd14696
MD5 6b14f274dd498eb4914a950ad66f0c95
BLAKE2b-256 9eb8e1fec230867e523c4749b439d9994e1264dd0a6e21e418492e8daac214b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1.tar.gz:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: bolivar-1.9.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 636d76cf3095ec5e6897c1de1eff481e4acea671c8abc7da1c05a9fe1dc9ac85
MD5 c9f5bd48eb5bca8b1a2b2af41554ee36
BLAKE2b-256 161957be1dc4005337b69e6c7f5b26ad5862c5ad414e24e27e007b0ee2123b22

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-win_amd64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1eead4682f58b869a1bd340179fb5f88f2b8a7bdef8c45d024341dd0136b829c
MD5 aa084dd81304f3f7295e2ca0d29258cd
BLAKE2b-256 a5b4bb50cc3f0be2d0d9895a61f61d3692ecddb271234e83134191c628a0d35e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1f71762d10522296290010b3a6c924aeba76df54b7a72ff9f48cf3d278ee68cf
MD5 1bbf44295e40adc835dcf9aea45511bc
BLAKE2b-256 f0d0c60f989fc774811829e6b37e8bd87f52c0db4b88d83527036c57d5feb583

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f37f84ccac6b7db7b2868e3d460a482dfa612cf0c3dfb827429bf03752586d70
MD5 fb7aac8b7c29e8fbd03b40c0cfb70dbb
BLAKE2b-256 39d2fb5d6c56f23049fdde075d44b4d0be7c4c686d370bbdbe69594de834973c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-manylinux_2_28_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9ee8209556a6b40d2ca6a2bfbf45c1938086ddb2c35f7f59f65860632bb723ec
MD5 6734d4f34ae1aa61d31de25200d41408
BLAKE2b-256 9e34e4a18bf690f396a7d93ab50e9d8f9a7ba49d341b5f1df414b98d8e09d9a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-manylinux_2_28_aarch64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc450af6a1dd229959bb5cd213a96e8a77e118e1430fc953d4af1c7aa569f7c1
MD5 4aff36f73f8d6c3c4c1af599a9ffc5e0
BLAKE2b-256 ada5518da41ebc298dc2810a658134a7aaaadf14679749abdb9b2f7b4f23d596

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 576f5a975621d3792647ec6b893b626a2f37bbe0054595c74374846ee2bc2ae1
MD5 a1538709cb2ce7b8d12f6bc89cc67fee
BLAKE2b-256 a1a913ebdb9f785d34e78563e66a81f68828026d854b5ab346634ef336e0149d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp314-cp314t-macosx_10_12_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: bolivar-1.9.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e83e54f5b5be346bd210f52a3f81a3a1f5897e5340fb146e0b39797c97d94d7b
MD5 27b884888fb625df1ff9d15846c1464d
BLAKE2b-256 f333513330b8a527ee15aec28056e0324dea132a629a627a5af5b62e83bdf49d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-win_amd64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8b8f5d1c9e08ac73e0a567a3603c567f08276cfa54a17dab8f4ff712907df01b
MD5 1687279d1502d1261f81cf7a0aade24c
BLAKE2b-256 24c6e035bce14f5ecbc1949a19c6060bcd5c511f00846e29b457547957e0b19d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 48f17af082f69534544a38b9e45390d844c16591e8069515d602ff58e67bbeef
MD5 8e4e33f0c93952fda92342f87603d665
BLAKE2b-256 64ca4532f04649000b331176fa7f90c14732bc20b3724237ca3487b806bf0fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6348a9e411c8dbbc7d0ac5a5ff41d75146f9a79bf9d09bbd40a0f3b7fe479811
MD5 e24d810fb221023ad9dd09b5bae94c81
BLAKE2b-256 16ec92ee73323512d0ca2f14b1e907b31e0a824d485bbd9c23ab987fb839ad05

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 234accac5ee86291545b0b7b288ce59c255834daa78cc4d8ef7509267e5c7db0
MD5 1bb076656bdd867e15a7b6d88c7207c3
BLAKE2b-256 1036e7a84c820e6f9e6f0d503df93f9025679534b8471abe86d580f57e5c4568

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bafe1ee0b0b2e54bcdcb4bc2b248cf9fcf4db153d27dec84a9c31cdea674fee4
MD5 0535000400e3ca5744ab5bb4bf903b76
BLAKE2b-256 3301378ac18ab87e4a97b46d77d7f21b2a4d1c9d934d02084ecdd697d675ee94

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bolivar-1.9.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bf51099e56cea1cea25344ff33e1126a9973ae9336475b697b1ca0b2d8256dad
MD5 6ba9e368a69a9a3e8ca1b5995b289079
BLAKE2b-256 3a925ec2ea332b032fe61115859c7ca16b41ba87943cce4c41776b75faba41d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.1-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on harubi/bolivar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.2.1

15 files

2.2.0

15 files

2.1.0

15 files

2.0.0

15 files

1.9.3

15 files

1.9.2

15 files

This release

1.9.1 This release

15 files

1.8.0

43 files

1.7.0

45 files

1.6.1

45 files

1.6.0

45 files

1.5.2

45 files

1.5.1

95 files

1.5.0

95 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