r/PiCodingAgent • • 11d ago

Question How to read PDF

How to make pi read complex pdf with a lot of math?

It always read pdf by pdf2txt which it is not effective.

2 Upvotes

10 comments sorted by

1

u/elprogramatoreador 11d ago

Marker-pdf with full re-OCR

0

u/OwnTechnology1872 11d ago

Thank you. it seems a Python package. Is it heavy and slow?

1

u/elprogramatoreador 2d ago

Yes, very. You need a cuda gpu ideally or offload the process via aws

1

u/whiterose0000001 11d ago

Try anydocs

0

u/OwnTechnology1872 11d ago

extension?

1

u/whiterose0000001 11d ago

No no its a local ocr tool build by firecrwal

2

u/omppulse 11d ago

marker's solid. if you've got a vision model hooked up the other option is just rendering the pages to images (pdftoppm -png -r 150 file.pdf page) and having it read those, math comes through way better than any text extraction since it's actually looking at the equations. I'd wrap whichever one you go with in a little skill so it stops reaching for pdf2txt by default

1

u/Aeondave 6d ago

i guess this is he only one working https://github.com/SoMarkAI/OXR

1

u/patbi97 4d ago

mineru is great i used it for a 800 page pdf book with lots of layout and math

1

u/patbi97 4d ago

runs VLMs and layout predictors and its essentially a chain of multiple different kinds of neural networks with certain degree of deterministic parsing, so its not leightweigt, but highly accurate