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.2.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.2-cp314-cp314t-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.14tWindows x86-64

bolivar-1.9.2-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.2-cp314-cp314t-musllinux_1_2_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

bolivar-1.9.2-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.2-cp314-cp314t-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14tmacOS 10.12+ x86-64

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

Uploaded CPython 3.11+Windows x86-64

bolivar-1.9.2-cp311-abi3-musllinux_1_2_x86_64.whl (3.5 MB view details)

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

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

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

bolivar-1.9.2-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.2-cp311-abi3-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

bolivar-1.9.2-cp311-abi3-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

bolivar-1.9.2-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.2.tar.gz.

File metadata

  • Download URL: bolivar-1.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 da7ad574a9834c2623eba5e8fe50e7606e722ae335d6baa6f801bbfcb4b62410
MD5 d67e4496e1617fb51681ae1995661347
BLAKE2b-256 551f3e9818aeef4694d5e6a24123ef088cbc0b9541e5d47f848ca3e3f460fdc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2.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.2-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: bolivar-1.9.2-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.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 957899e66abe6c20ca5b1f1c9f4b170cfccfea8d7c36bc0a327aa96f852ed184
MD5 6490179ded3f177b6ea56fc820aacd4a
BLAKE2b-256 784eec39eb9c9164739a9bf4d7f8a3753c035f3caba5e676fe0ae08b1185e767

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7508fd5111a3d6204767fb18c1ff75fbacef8f44b9c6e8110dfd937b7df020e4
MD5 0c0744c5b68027e2ee99c91adf3ea0ee
BLAKE2b-256 4a6375256fd5e50752f49cd23e89b736ad3abeedba24dbd12e7f129a8fd544e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c8c9fcbe1004cefb404114bc32c94d85e08add12fb0fe2a1032c16e081316aff
MD5 81e4d0c73660a566c52db516f2b66565
BLAKE2b-256 63b70fbdf4de6dce41ed5dbe07a9bb918cfd9a82c6736d840bfa2d0fd21f1b08

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e7bddf4c1ca4c57b6cacafa34c303731c517a5401f8985e349b4793786862cfa
MD5 52fcf79d6422198f5520660da5fc9655
BLAKE2b-256 1baaf9bd75625e79a4fd153ad172be985553ed0ce6f66f77cc56738b48381f43

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4477d80ef077e3aaba64813b55f101bfb908437ef9e4f79a1aef6c81f2eb38a1
MD5 39b04e6f03d87b5d2511d5db256c8b1f
BLAKE2b-256 c537b957f4fd3fb53c04eec8224f744c2baf220d9c471fa99c8fcfbbbd3c2410

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bdb00936cabd803d0dd4a6cfa1f354a2488eaa05a6ddf33a189eb3f08cb57a28
MD5 03460e2d84d5239d3e43af317e0feca0
BLAKE2b-256 8efad175468c37b36bf764eb2a80f1581ff0ee8aeed3e47079c7816e132850f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f635823d810038966229000a4e21ef5105e127736cfd56be9f1f54506dd831f
MD5 3b04d3322c371c5d82a2596660922503
BLAKE2b-256 4d5bc9d4919f48538cb7697cd3f935233ff67d0cc292d9b7591e5422d133b080

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: bolivar-1.9.2-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.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dc4ecec4236a855c74198834eea8ec5c4aad3e5251a1a1d40e8e4c38834c9818
MD5 f51de3e254ac466f75f44eacf0c09f3f
BLAKE2b-256 eac449bd095bdf188bdb22ddb248bab568d29bb17c43acfbfec7aab9307c2d10

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fbed353a117816ad4d6c31718206d6a7d6ff60505ca8b1131053f96ef85641a9
MD5 49ed7cb1a0aeccf967ef5628c0b47cf3
BLAKE2b-256 3fbd1208d3fbc9ec5a1a4bf7b5e65bf77e6e102acf1f8adac940b8097b9f7505

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3b7276a1bf16e746700eea4fc1fa303014e46df01b306060cd4b3a08a336e490
MD5 05ab85ae01f61d9a262b6725a9ef4c80
BLAKE2b-256 a117d06950b9178462ce0a562b94dc4e5fec7b1afc8684558f8bd0f0399bcf82

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a495457d592fb52c2e80b6e19762371973d2dc505fa77f91706909296d89e26b
MD5 413592aa0eda16ea2370e70de87ada0b
BLAKE2b-256 b3ed3e040ac9873d225ad067b99fb82fbf341d4f128093f07affad2af6a86cd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 51cfa37d14eb0db3174f94758f89408806d5c57787a63fb2b8724a2fa322c3d3
MD5 81aa38591c270799402a9e0fe5afe119
BLAKE2b-256 ce301c0136aa298aa3534ffaaf44d2a74bac6f0f7e246aedf52cde0a5e7adcc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a7eb469c22a1954c5c278803f3f9392c635d90c78fc267c81eb905fe589396b
MD5 4c51f002f3ebbc79e85eeaf0f37db0a2
BLAKE2b-256 6ded8d5a8d25f37c76d26e30622d87389d2f9d9ad1e5683c630f3c0d68c7e99c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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.2-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bolivar-1.9.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8140e906e1eea16f59fb7a0d95e196d3925976b4b177476e1293c1617dd44afc
MD5 ee5f981dd68a9f395c24ef7b2a69645e
BLAKE2b-256 274ce6c7d0311f71f49fb026e2189a2043ea1bbd2332c1e24cb1d6b21e5d6182

See more details on using hashes here.

Provenance

The following attestation bundles were made for bolivar-1.9.2-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

This release

1.9.2 This release

15 files

1.9.1

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