frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Tell HN: Bob Cringely has died

928•paveworld•1d ago•208 comments

Orcah Studio: A local-first video agent that can search your videos

5•iliashad•3h ago•3 comments

Tell HN: Uceprotect is extorting website owners

99•goldenmember•10h ago•58 comments

Our digital privacy is being aggressively disbanded this week

8•Steaglsz•3h ago•0 comments

Ask HN: Who wants to be hired? (October 2026)

132•whoishiring•4d ago•544 comments

Ask HN: Who is hiring? (October 2026)

269•whoishiring•4d ago•317 comments

DOS Game Stunts Port to Linux,Windows,Browser,etc.

3•LowLevelMahn•1d ago•1 comments

Ask HN: What are you reading to your kids?

19•jopizio•5d ago•31 comments

Pico CSS is no longer maintained (final release v2.1.1)

5•anydigital•1d ago•7 comments

Muse.ai gets me kicked off fb marketplace

32•zcalvin•5d ago•16 comments

Tell HN: OVH price increase for dedicated servers

9•esher•3d ago•6 comments

Chamath says open AI models are "commoditize your complement." Agree?

6•Dinuda•2d ago•4 comments

What did Google do to its Linux terminal on Pixel phones

5•Steaglsz•2d ago•1 comments

Rpi – a Rust rewrite of the Pi agent, 10× faster startup

9•bigfishhk•4d ago•11 comments

GitHub mutuals on AI in life sciences or bioinformatics

5•arli_ap•2d ago•0 comments

Why Linux is picking up at a rapid pace for AI usage?

5•keshwanianup•1d ago•7 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