frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Tell HN: VS Code v1.117.0 automatically adds GitHub Copilot as your co author

5•adithyassekhar•1h ago•2 comments

Claude.ai down again?

28•zh_code•5h ago•20 comments

What I changed in how I use Claude Code after Anthropic's postmortem

4•cinooo•3h ago•0 comments

Ask HN: Is anyone still using the ChatGPT browser, Atlas?

3•widenrun•1h ago•1 comments

Ask HN: Anyone feel like they're just opting out of tech these days?

13•moomoo11•8h ago•7 comments

Tell HN: An update from the new Tindie team

77•altairprime•22h ago•48 comments

Increase in Claude Code speed bumps?

3•jesse_dot_id•10h ago•0 comments

Ask HN: Hosted Fossil for small teams – interesting, or wrong call?

7•ragelink•10h ago•3 comments

Tell HN: An app is silently installing itself on my iPhone every day

585•_-x-_•4d ago•187 comments

Ask HN: Is it still worth it to try to get a job in IT

7•morpheos137•15h ago•12 comments

Ask HN: Do you think AI will end up like dotcom?

5•dicksent•6h ago•2 comments

Ask HN: If coding gets faster, where should architecture happen?

5•karlosh•18h ago•4 comments

Ask HN: Anyone else suddenly have Brawls Stars on their iPhone?

4•realberkeaslan•19h ago•2 comments

SYNQ – Give ChatGPT and Claude permanent, local memory

2•Tamatarr•9h ago•0 comments

Ask HN: Is it just me or is Claude Code getting worse?

28•e-nouri•1d ago•18 comments

Tell HN: Claude 4.7 is ignoring stop hooks

108•LatencyKills•5d ago•88 comments

Tell HN: One Medical Is a Nightmare

31•rincebrain•2d ago•6 comments

Ask HN: When might we not have to do laundry or fold clothes or cook

23•samarthv•1d ago•19 comments

Why don't AI coding tools like REST?

16•sshadmand•1d ago•5 comments

Ask HN: Anyone want to collaborate on a local-first AI-based research assistant

24•venkatram-s•3d ago•9 comments

Ask HN: Do you read differently now that anything could be AI generated?

33•dwa3592•4d ago•31 comments

You've reached the end!

Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

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