frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Tell HN: PayPal Blocks GrapheneOS

298•leumon•5h ago•166 comments

Ask HN: Hugging Face is out. Who is hosting open models?

4•FireUpTheTorren•31m ago•2 comments

Tell HN: Gmail can mark legit mail from google.com as spam

4•salviati•32m ago•1 comments

Xcancel and Nitter have been taken down

137•madduci•4h ago•112 comments

Ask HN: How do you feel about the new 5H usage limit in Codex?

2•embedding-shape•52m ago•0 comments

Ask HN: If I am 16 what should I learn? Which books should read?

2•AmirMakirr•1h ago•6 comments

Another Webpage Screenshot and OG Image Generation API

2•foodpad•2h ago•0 comments

Ask HN: Dear LinkedIn, do you want to do business, yes or no?

3•stefanos82•2h ago•5 comments

AI Artist

2•thallukrish•1h ago•0 comments

Ask HN: Do you still do pair programming in this agentic age?

4•Andugal•7h ago•4 comments

Ask HN: Why do tools like customer.io abandon self-serve after their Series A?

14•alessandroetc•19h ago•5 comments

Ask HN: Where else do you spend time on the internet other than HN?

10•Gecko4072•23h ago•13 comments

Taalas API Anyone?

2•revanthmatha•15h ago•2 comments

Encoding Myself into the System

4•nharziro•15h ago•2 comments

Ask HN: Why are Claude models so verbose?

9•JacobWolf•1d ago•9 comments

I keep getting flagged for AI, but I suck at writing. How can I solve this?

6•quesobob•18h ago•8 comments

Ask HN: Good large format (>20 inches) touchscreen E-Paper display options?

30•foota•2d ago•8 comments

Ask HN: Those making $500/month on side projects in 2026 – Show and tell

73•kaladan•3d ago•96 comments

Ask HN: How about delayed MIT/GPL?

5•afiori•20h ago•4 comments

Tell HN: Even HN is getting heavy traffic by AI crawlers

8•ksec•21h ago•3 comments

Ask HN: What are you using to access x.com at the moment?

5•throwaw12•1d ago•8 comments

Ask HN: How do you use artifacts, and how do they help in your projects?

2•AmirMakirr•22h ago•0 comments

Ask HN: How do you code review?

7•idose•1d ago•6 comments

Looking for people to follow designing systems to ship code with AI agents

8•mutahn•1d ago•1 comments

Ask HN: Phished Microsoft account, recovery useless

3•tgmatt•23h ago•0 comments

Requests for Startups: Energy

2•NarcisMirandes•1d ago•6 comments

Ask HN: Are you still using AI code autocomplete?

5•jawuilp•1d ago•15 comments

Tell HN: Google Search to begin using opaque redirect URLs on search results

6•exploraz•1d ago•7 comments

One MCP directory for all docs.domain.tld (No auth needed)

3•respectattentio•1d ago•0 comments

You've reached the end!

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