mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
v0.0.1
WARNING: This software is in its very early days, might not work well, and might change dramatically in future versions.
PDFPlumber
Plumb a PDF for detailed information about each char, rectangle, line, et cetera.
Built on pdfminer/pdfminer.six.
Installation
pip install git+https://github.com/goulu/pdfminer#egg=pdfminer.six
pip install pdfplumber
Usage
import pdfplumber
pdf = pdfplumber.from_path("path/to/file.pdf")
# OR
with open("path/to/file.pdf") as f:
pdf = pdfplumber.load(f)
print(pdf.chars)
print(pdf.rects)
print(pdf.lines)
Pandas Integration
By default, pdf.chars, etc., will be a plain Python dictionary. But if you pandas=True to pdfplumber.load/.from_file, you'll receive those properties as Pandas dataframes.
Python Support
Support for Python 3 is rough around the edges and largely dependent on the progress of pdfminer.six.
Feedback
Issues and pull requests welcome.
Description
Languages
Python
99.7%
Makefile
0.3%