pikepdf
OCRmyPDF
Our great sponsors
pikepdf | OCRmyPDF | |
---|---|---|
4 | 77 | |
2,019 | 11,866 | |
1.7% | 3.8% | |
9.5 | 9.6 | |
4 days ago | 13 days ago | |
Python | Python | |
Mozilla Public License 2.0 | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pikepdf
-
This Week in Python
pikepdf – A Python library for reading and writing PDF, powered by qpdf
-
Recovering redacted information from pixelated videos
Not off the shelf but here are some tools. I have no experience with them.
Wolf binarization - I think it makes the text more clear before OCR.
https://github.com/chriswolfvision/local_adaptive_binarizati...
This thing OCRs the pdf using Tesseract OCR
https://github.com/ocrmypdf/OCRmyPDF/
Two other pdf tools
-
Show HN: Pystitcher – A Declarative Alternative to Pdftk
i recently transitioned a large PDF processing pipeline[1] away from PyPDF3 to use the pikepdf[2] library instead. pikepdf is based on the C++ `qpdf` library, and this switch has cut the necessary special-case manual checking + error handling in half compared to pypdf for these sorts of tasks.
[1]: i'm helping out with the CV Open Access archive, https://openaccess.thecvf.com/menu. broadly, our pipeline needs to ingest tons of author-provided PDFs of varying quality and output a canonical PDF with corrected page numbers, proper metadata, and a banner stamped on the first page. it's a lot of work, and it's not uncommon for pypdf to simply fail for slightly invalid input or give garbled results. this isn't optimal since we can't review 2,000 papers per conference release lol. pypdf has been nice, but pikepdf has handled everything i've thrown at it.
- a collection of pdf-files (copy of a book ) in disorder: solfing wiht pikepdf
OCRmyPDF
-
TextSnatcher: Copy text from images, for the Linux Desktop
Try https://github.com/ocrmypdf/OCRmyPDF - it uses Tesseract behind the scenes and it absolutely brilliant.
- FLaNK Stack Weekly 19 Feb 2024
-
Calibre – New in Calibre 7.0
I recommend running any such PDFs through OCRmyPDF.
-
A better document viewer
If by "like a photocopy" you mean the file contains images of text rather than text, the MacOS viewer presumably does OCR on the images. I don't know if there's a Linux document viewer with that capability built-in, but a quick search turned up the standalone tool OCRmyPDF.
- Gibts ein (CLI) tool, das Kontrast und Helligkeit von gescannten Textdokumenten dynamisch anpasst?
-
OCR for a full pdf on Neoreader
For anyone interested I solved the problem by first ocr files through the free and open source software ocrmypdf avaible here
-
ELI5: why is PDF such a widespread text format, instead of a format that's actually easier to edit?
ocrmypdf is nice for stuff like that.
- Donut: OCR-Free Document Understanding Transformer
-
massive crop and OCR newspaper
Use imagemagick to convert them to PDF and ocrmypdf to straighten and OCR. See this explanation.
-
OCR pdf and just keep the OCR text
Fair enough, maybe this might work for you, it should seperate the text from image anyway and if you have Adobe acrobat it should be able delete the background too with the edit function. It may already be able to do that if you haven't tried it
What are some alternatives?
fpdf2 - Simple PDF generation for Python
PaddleOCR - Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
borb - borb is a library for reading, creating and manipulating PDF files in python.
pdfplumber - Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
PyPDF2 - A utility to read and write PDFs with Python [Moved to: https://github.com/py-pdf/PyPDF2]
tesserocr - A Python wrapper for the tesseract-ocr API
qpdf - QPDF: A content-preserving PDF document transformer
Paperless-ng - A supercharged version of paperless: scan, index and archive all your physical documents
PyPDF2 - A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files
invoice2data - Extract structured data from PDF invoices
malicious-pdf - 💀 Generate a bunch of malicious pdf files with phone-home functionality. Can be used with Burp Collaborator or Interact.sh
pdfminer.six - Community maintained fork of pdfminer - we fathom PDF