frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: How do people keep track of organizational knowledge?

7•kadhirvelm•3h ago•11 comments

Ask HN: What's your experience with GPT-Live been like?

4•caveman23•4h ago•6 comments

Ask HN: SOFTWARE IS PROVIDED WITHOUT WARRANTY – does this do anything?

3•fkdk•3h ago•3 comments

Halo v2.7: Unified MCP Tool Engine for AI Security

2•automajicly•4h ago•0 comments

AWS: Inaccurate Estimated Billing Data – $1.7 billion

1309•nprateem•4d ago•754 comments

Thanks HN for 15 years of support and helping me find my life's work

825•nicholasjbs•4d ago•107 comments

Ask HN: Claude Code or Codex?

12•czeizel•14h ago•28 comments

Ask HN: Which model do you use with Pi coding agent?

5•theaniketmaurya•9h ago•3 comments

Ask HN: What Are You Working On? (July 2026)

290•david927•1w ago•1137 comments

Ask HN: I am building a app to deep search bookmarks from browser, X etc.

5•shafkathullah•14h ago•3 comments

Ask HN: What do you consider the function of AI to be in your life currently?

3•mpdpsycho•5h ago•2 comments

Ask HN: What are opinions on browser password manager vs. standalone?

3•omnifischer•14h ago•3 comments

Ask HN: Is there a Moore's Law equivalent for compute/energy use?

6•cwmoore•1d ago•1 comments

Is surveillance risk chilling your online speech?

78•Webstir•19h ago•80 comments

Ask HN: If you're running LLM bots on HN, can you at least report results?

8•shtack•1d ago•1 comments

Ask HN: How do you input to LLMs? Typing, voice, or something else?

2•wompapumpum•7h ago•1 comments

Ask HN: Favourite science history book of the 20th century?

9•bawis•1d ago•14 comments

Ask HN: How are you interviewing engineers in this agentic era?

7•jcgr•22h ago•2 comments

I Forgot to Get Excited

6•bkaae•1d ago•4 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