pdfplumber (jsvine/pdfplumber)

Searching Database…

What is this?pdfplumber is a Python library that inspects PDFs in detail, exposing each character, line, rectangle, and curve, and makes it easy to extract text and tables from them.
Is it a library or a standalone app?It is a Python library built on pdfminer.six, with an additional command line interface for quick extraction without writing code.
How do I start using it?Install it and call pdfplumber.open(x) with a path, file object, or file-like object to get a PDF instance, then work with its .pages. There's also a CLI that outputs CSV, JSON, or plain text.
Do I need anything besides Python?Just Python 3.10 through 3.14 and the pdfminer.six dependency it's built on; no external services or API keys are required.
Does it work on scanned PDFs?Not reliably — it works best on machine-generated PDFs with real embedded text, not scanned images.
Can I open password-protected PDFs?Yes, pass a password keyword argument to pdfplumber.open() and it will decrypt the file for processing locally.
What page-level objects can I inspect?Each page exposes .chars, .lines, .rects, .curves, .images, .annots, and .hyperlinks as lists of dictionaries with detailed positional and styling properties for every embedded object.
Can I crop or filter a page before extracting data?Yes, Page.crop(), .within_bbox(), .outside_bbox(), and .filter() let you restrict objects to a bounding box or a custom test function before running extraction.
What output formats does the CLI support?The CLI supports --format csv, json, or text; json includes the most detail with page-level metadata and nested attributes, while text gives a layout-aware plain-text dump.
Can I control text layout analysis settings?Yes, you can pass laparams (pdfminer.six layout parameters) to pdfplumber.open() to tune things like line overlap detection for text extraction.
Creator
jsvine
Size
21.1 MB
Stars
10.9K
Age
11y
Commits · 90 Days