frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Free AI visibility scanner for your website

2•hexalogic•2h ago•0 comments

Tell HN: Our paid Claude AI subscription unavailable >1 week and no support

41•KellyCriterion•11h ago•21 comments

Why I prefer Opus 5 to Fable 5

19•novlrdotcom•8h ago•7 comments

Ask HN: How do you use Copilot in the CLI, App, and IDE?

3•EspressoGPT•5h ago•1 comments

SOTA on the hardest AI memory benchmark (BEAM, 10M tokens), with a smaller model

2•johnnymakes•3h ago•2 comments

Ask HN: How do you audit your app for compliance?

2•Luxter•4h ago•0 comments

Ask HN: How to rewrite `Claude.md` and install the skill for Opus5 and Fable5

5•hyhmrright•12h ago•6 comments

BMWs shows in-car ads for Spiderman

35•bigmattystyles•1d ago•17 comments

Can anti-fraud make large-scale attacks unprofitable?

3•jezzwar•7h ago•1 comments

Ask HN: Crooked Timber showed showed me a virus captcha, What now?

39•Jgoauh•4h ago•43 comments

Ask HN: Thoughts on AMD Ryzen AI MAX+ 395 for Local AI?

2•mempirate•9h ago•2 comments

Ask HN: Is there legal risk in AI memory?

2•sarjann•9h ago•0 comments

Internet is no longer accessible?

42•cute_boi•17h ago•23 comments

Ask HN: What do you use local models for?

3•tjomk•11h ago•2 comments

Ask HN: How to deal with security implications of running/installing projects?

12•johng•22h ago•11 comments

Goodbye POSIX, Hello Tea Room: Inside MinervaOS Architecture

10•xentnex•1d ago•6 comments

Ask HN: Why is every company encorporating AI everywhere?

24•vanessa1211•1d ago•39 comments

Claude's code comments – too much or just enough?

8•lalaleslieeeee•16h ago•5 comments

Ask HN: What apps are you building?

14•totaldude87•16h ago•20 comments

Ask HN: What are the most promising RL fields for a new master student?

34•zecice•2d ago•14 comments

Claude Code getting "API Error: 529 Overloaded"

5•croemer•1d ago•2 comments

Messaging platform I can self-host for my agents to communicate

2•giribisthebest•20h ago•3 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