frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: How to Relicense an Old Project

3•gradschool•38m ago•0 comments

Ask HN: OpenCode no longer including DeepSeek?

6•dv35z•3h ago•3 comments

SearXNG running on OpenBSD on a ThinkPad t420

2•open-search•2h ago•0 comments

Authenticated Git-fetch-over-HTTPS against gitlab.com is failing

2•basilgohar•2h ago•0 comments

Coding Agents killed my identity. How do you feel?

6•bah9•3h ago•20 comments

Ask HN: GitHub employees what's going on? Why?

321•sharts•4d ago•260 comments

Ask HN: Is GitHub Down Again?

11•delduca•4h ago•7 comments

Ask HN: How do you keep notes organized across long-running side projects?

5•hackerstest•6h ago•2 comments

Ask HN: Do teams really need to use GitHub?

5•avinoth•6h ago•4 comments

Ask HN: Alternatives to GitHub

643•dhruv3006•4d ago•431 comments

Ask HN: Do you need Google ads help?

5•cosbgn•9h ago•0 comments

Ask HN: I've quit six systems for tracking my illness. What works?

52•Abh1Works•5d ago•89 comments

Tell HN: Cloudflare silently injects its analytics when you switch nameservers

655•stagas•5d ago•202 comments

Ask HN: How did you write code on restricted hardware?

4•diselody•20h ago•6 comments

Idea to reduce AI token use at large orgs

5•mgav•1d ago•1 comments

Qwen3.8 Fetches Weird URLs

7•Luker88•22h ago•0 comments

InstantDB Is Shutting Down

10•redindian75•23h ago•1 comments

Ask HN: How do you review and validate LLM generated code?

7•darkLord19•23h ago•3 comments

Are you good at AI, or just using it?

11•ppezaris•1d ago•10 comments

Ask HN: One SSH key or many SSH keys?

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