Live data from Hacker News

Ask HN: How to OCR a PDF and preserve whitespace?

news.ycombinator.com

11–18 of 18 posts

Re: Ask HN: How to OCR a PDF and preserve whitespace?

#11

I’ve found that the built in OCR in the iPhone is just way better and more accurate than everything else out there. I’m talking about how if you have an image in your camera roll on the iPhone, you can select the text and copy it out. I had the idea to simply expose that service better so it could be applied to PDFs and made my first ever iPhone app that does this. It can easily handle hundreds of pages too. Only pro…

Y could probably build something with the shortcuts app that goes a long way - surprisingly long.

Re: Ask HN: How to OCR a PDF and preserve whitespace?

#15
post #10

I’ve found that the built in OCR in the iPhone is just way better and more accurate than everything else out there. I’m talking about how if you have an image in your camera roll on the iPhone, you can select the text and copy it out. I had the idea to simply expose that service better so it could be applied to PDFs and made my first ever iPhone app that does this. It can easily handle hundreds of pages too. Only pro…

Are you the guy that posted on x about using iphone device as OCR?

Not sure, I may have mentioned something about iOS OCR in general (not the app, which I’ve never discussed publicly before now).

Re: Ask HN: How to OCR a PDF and preserve whitespace?

#16
Your use case seems very specific. I personally am very happy with ocrmypdf[1], which is free and puts an invisible text layer into the pdf. However, since it is free, I'm pretty sure it cannot compete with the commercial solutions you tried.

There also is an older version PDF XChange viewer, that has the ability to do the same thing, although it is presented as "viewer".

1: https://github.com/ocrmypdf/OCRmyPDF/

Re: Ask HN: How to OCR a PDF and preserve whitespace?

#17
LLMWhisperer from Zipstack at https://llmwhisperer.unstract.com/ or https://github.com/VikParuchuri/surya will do a good job for you.

LLMWhisperer has some nice tooling where they can fall back to OCR as well forcing text extraction from scanned documents as well as documents that have the text preserved as text.

Re: Ask HN: How to OCR a PDF and preserve whitespace?

#18

Do give LLMWhisperer[1] a try. It does a good job preserving the layout for the most part — but one cannot escape PDF hell. Try LLMwhisperer Playground[2] with your documents; there is no need for any setup. Extracting multi-column layout example - https://imgur.com/roYmv0I [1] https://llmwhisperer.unstract.com/ [2] https://pg.llmwhisperer.unstract.com/

LLMWhisperer is great, seconded.
Post reply on HN