Extract clean text from PDFs.
Project description
txt-from-pdf: Extract clean text from PDFs
Extracting text from pdfs using pdfminer.six and pypdf. Adapted from PDFextract.
Installation
pip install txt-from-pdf
Usage
from txtfrompdf import extract_txt_from_pdf
pdf_path = "file.pdf"
text = extract_txt_from_pdf(pdf_path)
print(text)
CLI Usage
Single file:
txt-from-pdf --input file.pdf --output extracted-text
Multiple files in a directory:
txt-from-pdf --input dir-with-pdfs --output extracted-text
Detailed help:
usage: txt-from-pdf [-h] --input INPUT [--output OUTPUT] [--no_filter] [--size SIZE]
txt-from-pdf CLI - Extracts cleaned text from PDF files
options:
-h, --help show this help message and exit
--input INPUT Path to a folder containing PDFs or to a single PDF file. (Required)
--output OUTPUT Output location for the extracted text files. (Optional, default: 'extracted_text')
--no_filter Turn off cleaning the resulting text files. (Optional)
--size SIZE Maximum file size per page in bytes for processing (mostly images). (Optional, default: 300000)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
txt-from-pdf-1.1.0.tar.gz
(13.7 kB
view hashes)
Built Distribution
Close
Hashes for txt_from_pdf-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2d96b64c1d49d627d57b0c6d08cb08956b67c3eff835d20f33a22b38eee441a |
|
MD5 | 9d1fe62de57ea99f8d70789d145ee689 |
|
BLAKE2b-256 | 0f1defa94b7d3f325813fb89e463aab9545fbc11ea730f31a9d86ea9e83d8daf |