Skip to main content

PDFScraper

PyPI version

CLI program and library for extraction of PDF elements, which implements a search functionality that outputs summary in an HTML format. 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
  --multiprocessing MULTIPROCESSING
                        should multiprocessing be enabled

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.

multiprocessing, by default True, runs process in multiple threads to speed up processing. Should not be used with OCR as it significantly decreases performance

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.

Metadata

Release files for PDFScraper 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PDFScraper 1.1.9
File Size Uploaded
PDFScraper-1.1.9.tar.gz 12.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PDFScraper 1.1.9
File Interpreter ABI Platform
PDFScraper-1.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / PDFScraper-1.1.9.tar.gz

Download URL PDFScraper-1.1.9.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f1c7fa36bca1a035be5dad017ccd0dd751d43f7e21924da9dc04a1b3d4a42e0a
BLAKE2b-256 checksum
How to use checksums
0b5342498fa0a4807bd00bfb5a806d7ea4d3cfd54b6c82957565a583cfe50dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / PDFScraper-1.1.9-py3-none-any.whl

Download URL PDFScraper-1.1.9-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc2df703fcb13654b70979e111e1435d5f0eb00dd6a9804c34b6f13bdba8005d
BLAKE2b-256 checksum
How to use checksums
1369670dfc4453d60412a752e99d03a15d85bd05117cbc7e7cfcb40f9c50b234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.1.9 This release

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page