frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: Do you run A/B Tests?

3•hackeryogi•5h ago•3 comments

AgentObs – a hook that blocks Claude Code before you hit your limit

2•klars-ai•5h ago•1 comments

Tell HN: PayPal blocks GrapheneOS

511•leumon•3d ago•324 comments

Ask HN: Is .org now Trump-controlled?

20•selfhoster1312•10h ago•5 comments

Ask HN: How to break Claude Code addiction?

16•isomorph•1d ago•24 comments

Ask HN: What's a Good Physical Printer?

9•xrd•2d ago•11 comments

Ask HN: Best way to archive 25 years of emails

5•astatine•1d ago•9 comments

Ask HN: Why do we need MCP?

10•jwally•1d ago•17 comments

Ask HN: Alternatives to Fail2ban?

6•jech•2d ago•7 comments

Is "An agent with tools" the only valid LLM application?

5•gmarkwa•1d ago•5 comments

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

23•FireUpTheTorren•3d ago•17 comments

Ask HN: What BOYK AI client are you using?

3•yeeyang•1d ago•0 comments

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

78•kaladan•6d ago•103 comments

Ask HN: Why are onionv3 services not more popular?

6•smalltorch•2d ago•4 comments

Ask HN: Any true alternatives to electron JavaScript?

12•dhruv3006•2d ago•15 comments

Ask HN: Any blogs/personal notes from game devs who self-published a game?

5•ssenssei•2d ago•1 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