Skip to main content

PDF text and table search

Project description

PDFScraper

PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PDFScraper-1.0.12.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

PDFScraper-1.0.12-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file PDFScraper-1.0.12.tar.gz.

File metadata

  • Download URL: PDFScraper-1.0.12.tar.gz
  • Upload date:
  • Size: 11.7 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

Hashes for PDFScraper-1.0.12.tar.gz
Algorithm Hash digest
SHA256 631c312efebfffec68ce02b794f7c057fb062a818ef4cc0c4d20495a33d46cdb
MD5 00cf67ea4b4d2df8e5479c47b98f18aa
BLAKE2b-256 112110894069a80dc0bf3c341adb66c26afc57cd225ecd2fc41b7149b4cb265c

See more details on using hashes here.

File details

Details for the file PDFScraper-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: PDFScraper-1.0.12-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

Hashes for PDFScraper-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 5aeb57dbb7278eefa78e982fe40c81c3db1c5e2996b12620fd4c151159d92a32
MD5 2bf44459d5b3be927fcfebc6bda50858
BLAKE2b-256 933334bb8f2240422e36ad60a5f6122c1e7c1012a00d4b2a78814a6f4f798935

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page