frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Tell HN: Happy Thanksgiving

575•ericmay•10h ago•134 comments

DietPi released a new version v10.9

13•stephanstsdietp•4h ago•1 comments

Ask HN: Any courses/products by indie makers worth getting today?

65•akudha•8h ago•30 comments

Tell HN: Lots of Ask HNs again

395•dang•23h ago•154 comments

Ask HN: Anthropic is accusing my company of distilling. How can I prove I'm not?

464•weli•2d ago•356 comments

Ask HN: What's Going on with the Minecraft Rust Rewrite? (Horizon)

3•goodmythical•2h ago•4 comments

Ask HN: How do you find meaning of life at 41?

49•BTA_DoIt•6h ago•91 comments

Ask HN: Where is all the amazing AI-generated software?

18•8bitbeep•1d ago•50 comments

Ask HN: Is RSA in Jeopardy?

16•lyfeninja•1d ago•8 comments

Ask HN: Are the trades a safe career transition?

87•Rd6n6•4d ago•125 comments

Ask HN: How do you handle corporate life?

4•busssard•14h ago•3 comments

Ask HN: Security for the Small Developer

8•dvduval•21h ago•7 comments

Ask HN: Coworker rejects PR (a month in) because it does not meet his standards

20•LandOfMightDev•2d ago•46 comments

Ask HN: Am I the only one whose AI hype is cooling down a lot?

37•redleathercouch•2d ago•26 comments

Ask HN: If I broke prime factorization, who should I tell?

6•fercircularbuf•14h ago•10 comments

Shirudo doesn't work, this does

3•ok_major_9889•22h ago•0 comments

Ask HN: If you had no limitations what would you build in AI?

11•NarcisMirandes•1d ago•26 comments

Ask HN: For professional Mathematicians –- about your career in the future

6•markus_zhang•1d ago•4 comments

Ask HN: How to manage "crown jewel" files?

4•DLA•1d ago•3 comments

Ask HN: Its 2026 and there is still not good Email client for macOS. Why?

12•orbanlevi•2d ago•23 comments

Ask HN: Best VPS Hosting in 2026?

8•CM30•1d ago•11 comments

Ask HN: Everything will get breached. How do you limit the blast radius?

20•humbleferret•2d ago•14 comments

Why are so many services using email magic links for login?

20•bfbf•2d ago•18 comments

Does anyone gets hired with himalaya, well found or other remote hiring sites?

4•rohansrma•2d ago•5 comments

Ask HN: What Happened to Midjourney?

13•vmuhammadsaid20•2d ago•7 comments

Ask HN: Is a college degree still necessary for a programmer?

9•vmuhammadsaid20•3d ago•22 comments

Tell HN: Claude Opus 4.5 turns one year old today

12•zkldi•2d ago•5 comments

Ask HN: Will Claude be able to solve future maths problems?

3•olirex99•2d ago•11 comments

Ask HN: How are tech recruiters assessed on their recruiting skills?

6•_override•3d ago•5 comments

Are you clinging to the TUI to feel like a developer?

8•TomEleff•4d ago•18 comments
Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

4•martinald•1y 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•1y 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•1y ago
give https://pg.llmwhisperer.unstract.com/ a try