PDF text and table search
Project description
PDFScraper
CLI program for searching text and tables inside of PDF documents and displaying results in HTML. It combines Pdfminer.six, Camelot and Tesseract OCR in a single program, which is simple to use.
How to use
Install using pip
Use pip to install PDFScraper:
$ pip install PDFScraper
Arguments
optional arguments: -h, --help show this help message and exit --path PATH path to pdf folder or file --out OUT path to output file location --log_level {critical,error,warning,info,debug} logger level to use (default: info) --search SEARCH word to search for --tessdata TESSDATA location of tesseract data files --tables TABLES should tables be extracted and searched --search_mode SEARCH_MODE And or Or search, when multiple search words are provided
path
, by default ".", specifies the location of the PDF folder or directory.
out
, by default ".", specifies output directory in which summary.html
file is created.
search
argument is used for specifying the word or sentence that will be searched for in the PDF documents.
tessdata
argument can be used to specify custom tessdata location for OCR analysis.
tables
, by default True, specifies whether to search for search word in tables. Disabling tables search improves speed significantly.
search_mode
, by default in 'and' mode, specifies whether all the search terms need to be contained inside paragraph. In 'or' mode, the paragraph is returned if any of the terms are contained. In 'and' mode, the paragraph is returned if all the terms are contained.
OCR
tessdata pretrained language files need to be manually added to the tessdata directory.
OCR analysis of PDF documents currently supports English and Slovenian language. Language of the document is automatically detected using langdetect library.
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
Built Distribution
File details
Details for the file PDFScraper-1.0.9.tar.gz
.
File metadata
- Download URL: PDFScraper-1.0.9.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.4.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274e9b3ba0300a8f3854e83a9db3798c7c21978677e9260ad7abb7959eca0ce1 |
|
MD5 | d3a7e7a138969274ae7e844f66c82086 |
|
BLAKE2b-256 | 25b5121efdd63b0a90907ea0d709225d22afbeef1d1296c50af647f87189c681 |
File details
Details for the file PDFScraper-1.0.9-py3-none-any.whl
.
File metadata
- Download URL: PDFScraper-1.0.9-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.4.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9697386ba96504d93da49a89771f4439e6a3a9de5f400c5d73ce715f04aa4a75 |
|
MD5 | 5565cebfd23f337f8d8b1c54db71a7cb |
|
BLAKE2b-256 | fb883467642a200200704a696c8efcc3e7b945de2d3759517b9cc86d3c4e1c5e |