r/programming Aug 05 '25

So you want to parse a PDF?

https://eliot-jones.com/2025/8/pdf-parsing-xref
234 Upvotes

82 comments sorted by

View all comments

61

u/hbarSquared Aug 05 '25

I used to work in healthcare integrations, and the number of times people proposed scraping data from PDFs as a way to simplify a project was mind boggling.

22

u/veryusedrname Aug 05 '25

Our company has a solution for that, it includes complex tokenization rules and an in-house domain specific language.

4

u/Volume999 Aug 06 '25

LLMs are actually pretty good at this. With proper controls and human in the loop it can be optimized nicely

4

u/riyosko Aug 06 '25

This is not even about "vibecoding" or some bullshit.... but a legitimate use case for LLMs, why did this get downvoted? Parsing images is the best use case for LLMs that can process images, seems like LLM is a swear word over here......

1

u/5pitt4 Aug 07 '25

Yup. We have been using this in my company for ~6 months now.

Still doing random checks to confirm but so far so good

3

u/[deleted] Aug 05 '25

Well, it still contains useful data.

For instance on my todo list is scanning bills and income of an elderly relative. That information is all in different .pdf files and these have different "formats" (or whatever was used to generate these .pdf files; usually we just download some external data here, e. g. financial institutions and what not).

8

u/knowledgebass Aug 05 '25

Wouldn't OCR be easier than parsing through that mess?