frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: How to be SOC2 Type 2 compliant as a solo-entreprenuer?

158•sochix•2d ago•130 comments

SlothDB is an OLAP DB ahead of DuckDB on Clickbench SQL database in C++20

3•souravroy78•7h ago•0 comments

Tell HN: Mindie.dev is scraping emails from profiles to send spam

18•stackghost•16h ago•2 comments

Ask HN: What LLM models are you using and why?

8•rubyn00bie•12h ago•8 comments

Ask HN: We just had an actual UUID v4 collision...

475•mittermayr•1w ago•342 comments

Tell HN: Dont use Claude Design, lost access to my projects after unsubscribing

295•pycassa•3d ago•85 comments

Rumors of my death are slightly exaggerated

1673•CliffStoll•1w ago•258 comments

Ask HN: What are you working on? (May 2026)

288•david927•1w ago•1100 comments

Note-taking software,Novel ideas

5•huaqing•1d ago•6 comments

Viable open source Claude Design alternative?

23•splatzone•2d ago•6 comments

Ask HN: Do you still spend time maintaining Claude.md / AGENTS.md files?

8•david_d8912•1d ago•9 comments

Which country will be the first to pass laws limiting Meta Ray-Ban glasses?

28•nothrowaways•2d ago•8 comments

Ask HN: Can I take Meta to court for banning business Insta or FB account?

12•milanspeaks•2d ago•7 comments

Ask HN: What happened to the movie "Pirates of the Silicon Valley"

11•acossta•2d ago•4 comments

Ask HN: What happened to ssh-audit.com?

4•Bender•1d ago•1 comments

Ask HN: What are you working on (non-AI)?

43•BrunoBernardino•4d ago•51 comments

You've reached the end!

Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

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