frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: AI writes better code than me. How to keep my identity?

4•jdw64•38m ago•2 comments

TwitterWebViewer has been permanently discontinued

6•avidruntime•19m ago•0 comments

Ask HN: Why are onionv3 services not more popular?

3•smalltorch•4h ago•1 comments

Ask HN: How do you use multiple sessions for software engineering?

4•top_rooster•3h ago•2 comments

Ask HN: Any true alternatives to electron JavaScript?

7•dhruv3006•5h ago•8 comments

Ask HN: Alternatives to Fail2ban?

4•jech•5h ago•1 comments

Tell HN: PayPal blocks GrapheneOS

498•leumon•1d ago•322 comments

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

5•ssenssei•5h ago•0 comments

Ask HN: Open-source Grok bot anyone?

3•shafkathullah•55m ago•0 comments

Ask HN: What's a Good Physical Printer?

5•xrd•7h ago•6 comments

Ask HN: Is the FTC National Do Not Call Registry a False Contingency or Placebo?

3•eth0up•3h ago•0 comments

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

20•FireUpTheTorren•1d ago•15 comments

Amazon now hides all customer reviews on products

80•tonymet•1d ago•46 comments

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

7•AmirMakirr•1d ago•16 comments

Ask HN: Should I leave web development to study medicine in my mid-30s?

6•lovepuzzles•1d ago•10 comments

Ask HN: How to Vibe Design as Engineer?

7•metrofun•1d ago•7 comments

Ask HN: Why is AI civil tech and not military first?

7•esher•1d ago•15 comments

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

4•embedding-shape•1d ago•2 comments

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

7•stefanos82•1d ago•8 comments

Ask HN: How many of you juggle multiple agent sessions at the same time?

6•top_rooster•23h ago•4 comments

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

14•alessandroetc•1d ago•6 comments

Ask HN: AI agent acts. Your logs say so. But you wrote the logs

5•Yahyaaa•1d ago•5 comments

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

77•kaladan•4d ago•97 comments

Ask HN: Does anyone have a VRAM tester? Something like MemTest86+ but for GPUs?

9•vkaku•22h ago•2 comments

Solving all open source tech debt with Codex

3•surajkrajan•1d ago•5 comments

Ask HN: How do you guys stop coding agents from acting out of line?

5•vivekyyy•1d ago•3 comments

Ask HN: Ideas for dealing with overly-do-gooder agents

2•zof3•1d ago•0 comments

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

5•salviati•1d ago•1 comments

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

30•foota•3d ago•12 comments

Ask HN: Why are Claude models so verbose?

10•JacobWolf•2d ago•11 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