frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: Best Embedding Models?

12•devstein•7h ago•4 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

206•proberts•3d ago•247 comments

Why Does a Single Firefox Tab Take Almost 1.5GB RAM?

5•syeare•5h ago•7 comments

Ask HN: Who wants to be hired? (May 2026)

146•whoishiring•3d ago•429 comments

Ask HN: Where are you getting your AI news from?

7•baetylus•12h ago•7 comments

Ask HN: Who is hiring? (May 2026)

303•whoishiring•3d ago•421 comments

Ask HN: When did you move from AI agentic loops to simpler deterministic system?

6•laxmena•14h ago•3 comments

Ask HN: Is a hands-off, family-friendly, de-Googled "home lab" feasible?

9•strix_varius•20h ago•10 comments

Ask HN: Is the Job Market Actually Bad?

125•idontwantthis•2d ago•198 comments

Tell HN: The saddest irony of my/our craft

12•dakiol•15h ago•6 comments

Can anyone point me to a ShowHN first post policy documentation?

9•upwindchange•18h ago•9 comments

Tell HN: An update from the new Tindie team

85•altairprime•6d ago•49 comments

Ask HN: Those building Swift apps without touching Xcode, what is your workflow?

18•p5v•1d ago•9 comments

Tell HN: An app is silently installing itself on my iPhone every day

593•_-x-_•1w ago•188 comments

Building a Web Framework from Scratch

7•NewSmoke38•1d ago•1 comments

Claude Code dies with ANTHROPIC_API_KEY in cloud environment

16•sroussey•4d ago•2 comments

Ask HN: What's the best way to handle large file P2P transfer in the browser?

4•feixiangfly•20h ago•2 comments

Tell HN: Happy May Day

13•chrishill89•3d ago•5 comments

You've reached the end!

Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

4•martinald•11mo ago
I've got very used to using the "big" LLMs for analysing PDFs

Now llama.cpp has vision support; I tried out PDFs with it locally (via LM Studio) but the results weren't as good as I hoped for. One time it insisted it couldn't do "OCR", but gave me an example of what the data _could_ look like - which was the data.

The other major problem is sometimes PDFs are actually made up of images; and it got super confused on those as well.

Given this is so new I'm struggling to find any tools which make this easier.

Comments

raymond_goo•11mo ago
Try something like this

  !pip install pytesseract pdf2image pillow
  !apt install poppler-utils
  #!apt install tesseract-ocr
  from pdf2image import convert_from_path
  import pytesseract

  pages = convert_from_path('k.pdf', dpi=300)

  all_text = ""
  for page_num, img in enumerate(pages, start=1):
      text = pytesseract.image_to_string(img)
      all_text += f"\n--- Page {page_num} ---\n{text}"

  print(all_text)
constantinum•11mo ago
give https://pg.llmwhisperer.unstract.com/ a try