Newsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.
Using the tesseract CLI tool#
Tesseract OCR has a command-line utility which is woefully under-documented. Thanks to Alexandru Nedelcu I figured out how to use it today.
To install on macOS:
1brew install tesseractTo convert an image into an annotated PDF (which you can then copy and paste text out of, and which will be correctly indexed by Spotlight):
1tesseract image.png output-file -l eng pdfThe second output-file argument there is the path and filename of the output - note that I didn’t include a .pdf extension because Tesseract adds that automatically - so the output will be in a file called output-file.pdf.
To get out just the plain text:
1tesseract image.png output-file -l eng txtNewsletter
TechAnV Blog
Get updates on security engineering, Rust, eBPF, and DevSecOps. No spam, unsubscribe anytime.
Check your inbox and click the confirmation link to complete your subscription.