GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bbqsrc/pdf-strings

BranchesTags
Open more actions menu

Latest commit

 

History

314 Commits
314 Commits

Folders and files

NameName
Last commit message
Last commit date
cli
cli
 
 
examples
examples
 
 
ffi
ffi
 
 
python
python
 
 
src
src
 
 
vendor
vendor
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

pdf-extract

crates.io Documentation

Extract text from PDFs with position data.

Usage

// Simple extraction
let output = pdf_strings::from_path("file.pdf")?;
println!("{}", output);  // Plain text

// With password
let output = pdf_strings::PdfExtractor::builder()
    .password("secret")
    .build()
    .from_path("encrypted.pdf")?;

// Preserve spatial layout
println!("{}", output.to_string_pretty());

// Access structured data with bounding boxes
for line in output.lines() {
    for span in line {
        println!("{} at {:?}", span.text, span.bbox);
    }
}

Features

  • Plain text extraction
  • Spatial layout preservation
  • Bounding box coordinates for every text span
  • Font encoding resolution (ToUnicode, Type1, TrueType, CID, Type3)
  • Password-protected PDF support
  • Handles complex fonts, rotated text, and multi-column layouts

API

Three output formats:

  • to_string() - Plain text
  • to_string_pretty() - Character grid rendering that preserves spatial layout
  • lines() - Structured data with TextSpan objects containing text, bounding boxes, and font sizes

Acknowledgements

This is a fork of pdf-extract. Thanks for laying the groundwork, PDFs are ... something else.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.