This is a Python 3 module and command line utility that analyzes XML output from the
program `pdftohtml` in order to extract tables from PDF files and output the data as CSV.
For example:
pdftohtml -xml -stdout file.pdf | pdftable -f file%d.csv
See also `pdftable -h` and http://sourceforge.net/projects/pdftable
Original author: (c) 2009 Kyle Cronan <kyle@pbx.org>
This Python 3 implementation: (c) 2017 Phil Gooch
As per Kyle's code, this version is licensed under GPLv3. See LICENSE file.
# Installation
Install `pdftohtml` via `poppler-utils` (Linux) or `poppler` (Mac OSX)
Then install the module
python setup.py install
or
pip install pdftablr
## Command line usage
pdftohtml -xml -stdout file.pdf | pdftable -f file%d.csv
## Module usage
from pdftablr.table_extractor import Extractor
# XML file created from pdftohtml
input_path = '/path/to/file.xml'
# Output CSV file
output_path = '/path/to/output.csv'
with open(output_path, 'w') as output_file:
table_extractor = Extractor(output_file=output_file)
with open(input_path) as f:
table_extractor.read_file(f)
tables = table_extractor.extract()
for table in tables:
table.output(writer=None)
Metadata
Release files for pdftablr 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdftablr-0.1.0.tar.gz | 7.4 kB | Without provenance | Details for pdftablr-0.1.0.tar.gz |
Release files / pdftablr-0.1.0.tar.gz
| Download URL | pdftablr-0.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
485c4ce1df97176231ff6269eaaab3c1c58f578b5cea395c645ebb4f5e662a1f
|
|
BLAKE2b-256 checksum How to use checksums |
2fb6e9c613e989f7e95d21e83d988fd27141e52460b1d973a4f6a74051d0af5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pdftablr 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.