frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

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

Tell HN: Scribd Breached

333•x______________•20h ago•119 comments

Ask HN: I'd like to request Microsoft open source Windows XP

4•fosco•5h ago•5 comments

Tell HN: X is opening any tweet link in a webview whether you press it or not

38•stillatit•21h ago•3 comments

Ask HN: What's it like working at Google nowadays? Core teams like Search, Ads?

43•karakoram•1d ago•27 comments

Ask HN: Are you using AI to do election choices like Mayor, Special Measures

6•andsoitis•6h ago•3 comments

Ask HN: Will apps be going away in favor of personal assistants?

4•talmr•7h ago•5 comments

Ask HN: Is applying to Y Combinator worth it if you aren't an insider?

18•all2•1d ago•10 comments

Ask HN: Opus 5.5 suddenly dumb as rocks?

31•jahala•2d ago•31 comments

Ask HN: Is the Microsoft buyout just a long overdue correction?

6•sky2224•16h ago•17 comments

Ask HN: Are most of you using HN Replies? Or what else do you use?

7•Gooblebrai•23h ago•7 comments

Ask HN: Do you have side-projects that generate >$500 revenue/month?

37•learner_yearner•2d ago•20 comments

"Wrong" Email

25•rbmm•1d ago•5 comments

Ask HN: Hack

10•throwaway3309•1d ago•3 comments

GEMM Tutorial and UlmBLAS

4•michael-lehn•1d ago•2 comments

Ask HN: Are you using a custom harness?

11•japhyr•1d ago•7 comments

Tell HN: Claude Code adds your email to the prompt, the LLM sends it to websites

32•TekMol•2d ago•4 comments

Ask HN: Are you putting off hardware upgrades because of AI coding tools?

5•winrid•1d ago•1 comments

Ask HN: Are Knuth's Stanford Pages Down?

8•weinzierl•2d ago•4 comments

Ask HN: How do you verify a reported domain sale is real?

2•mousabelhag•14h ago•1 comments

Ask HN: Is your leadership pushing you to skip dev review?

10•arm32•2d ago•7 comments

Ask HN: Antrophic tightened usage limits?

6•lukan•2d ago•0 comments

Ask HN: How are you using AI in your personal life?

3•whall6•2d ago•5 comments

Ask HN: Sitting on unused OpenAI / Anthropic / AWS credits that will expire?

3•xiaomaijj•2d ago•2 comments

Ask HN: Should I be polite to my agent or should I treat it like shit?

5•d--b•2d ago•12 comments

Ask HN: Why are there not more terminal apps?

6•lucasov•2d ago•9 comments

Ask HN: What's your iPhone Duo experience so far?

4•dgellow•2d ago•1 comments

You've reached the end!