Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

yapot
=====

Yet Another PDF OCR Tool


This is a library (tool) that makes PDF -> Text as easy as possble by doing a lot of the hard stuff for you!

You will need ImageMagick and Tesseract to use yapot.

Ubuntu
------
> sudo apt-get install imagemagick libmagickcore-dev
> sudo apt-get install tesseract-ocr

To use yapot, do the following:

> pip install yapot

Then some code:

from yapot import convert_document

success, pdf_text = convert_document('file.pdf')

if success == True:
with open('file.txt', 'w') as f:
f.write(pdf_text)
else:
print "Unable to convert PDF!"

It's that simple!

Some more advanced things you can do are set the resolution, page delineation, and tell yapot not to delete temporary files (this can be useful when debugging nasty pdf's).

success, pdf_text = yapot.convert_document(
pdf_filename = pdf_filename, # The name of the pdf file
base_page_name = base_page_name, # The base of each page's image (default 'page')
resolution = 200, # Image DPI resolution (default 200)
delete_files = True, # delete temporary files (default True)
page_delineation = '\n--------\n', # page deination text (default '\n--------\n')
verbose = True, # output verbosity (default False)
)

Metadata

Release files for yapot b6f158a

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

Source distribution (sdist)

Source distribution for yapot b6f158a
File Size Uploaded Provenance Actions
yapot-b6f158a.tar.gz 17.1 kB Without provenance Details for yapot-b6f158a.tar.gz

Release files / yapot-b6f158a.tar.gz

Download URL yapot-b6f158a.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9b781b4b072a27efeed00632e001d2001b8a66df4880dd068b6c3e13b5c0d658
BLAKE2b-256 checksum
How to use checksums
7104ecaf064eacd01b650c282eafb7dcfc32f788965fe5506843edc089194be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for yapot b6f158a

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.

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