frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: How to deal with shipping AI-written code you don't understand?

15•rzk•6h ago•26 comments

Tell HN: Remember to migrate away from .name domain

166•nikanj•5d ago•115 comments

Ask HN: How do you deal with AI output of your boss?

15•okr•1d ago•14 comments

Ask HN: New Outlook` sends everything through Microsoft Servers

4•NicoJuicy•14h ago•4 comments

Tell HN: Massive amount of spam from "Who Wants to be hired"

10•0xmattf•1d ago•3 comments

Ask HN: System One models for autonomous agents

3•manlymuppet•1d ago•2 comments

Talk like Paul Dirac – fewer words is better

9•asen•2d ago•12 comments

Ask HN: Is anyone still running Token Ring or FDDI networks?

12•robotnikman•2d ago•3 comments

Why do computers/phones have a restart option along with the power off option?

7•saonnet•2d ago•12 comments

Ask HN: How can we stop UX people from changing UIs to get promotions?

6•ex-aws-dude•1d ago•4 comments

Ask HN: What Got You into Rust?

2•cloaky233•1d ago•3 comments

Ask HN: Thoughts on hiring junior engineers in 2026?

12•abhishekbasu•3d ago•27 comments

Triplet of 'Ghostly' Galaxies Hints at What Dark Matter Is – and Isn't

5•gumby•2d ago•2 comments

Best way to get SMS verification codes without using your own number?

3•guler26•22h ago•4 comments

Ask HN: How do I stop Gemini Live from asking."Would like to know more about..?"

2•orsenthil•2d ago•6 comments

Tell HN: Google Argon on a Pro subscription is worthless

13•bb88•3d ago•10 comments

Ask HN: Flying Car Practical Tech

6•NarcisMirandes•3d ago•10 comments

More Powerful Than Ever, (can't find work)

10•pieratt•3d ago•18 comments

Ask HN: Are you hesitant to install vibe-coded apps?

19•ex-aws-dude•5d ago•25 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