frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

GitLab 19.6.0 is out and still vulnerable to Ruby2Shell and NGINX2Root

25•hoechst•14h ago•6 comments

Ask HN: Where do you see Software in 5 years?

15•Odbyteusz•10h ago•16 comments

Anthropic should give stock to Stack Overflow (and OpenAI too)

4•thetjmccarty•8h ago•3 comments

Ask HN: If AI tools are so good, why isn't your bug backlog empty?

103•ex-aws-dude•3d ago•117 comments

The End of Continuous Rework

2•alexhr•10h ago•0 comments

Ask HN: How do you manage the curse of rabbit hole?

10•BOOSTERHIDROGEN•19h ago•7 comments

Ask HN: When does your app need its own UI vs. using it via MCP?

9•amoorthy•1d ago•7 comments

Ask HN: When was the last time you thought "that's bad API design"?

5•Mitchem•15h ago•1 comments

Rant: Gemini 4 does not make any sense

6•sambejk•15h ago•8 comments

Ask HN: Cheapest CPU Vms

13•mrkn1•1d ago•8 comments

Interesting Learnings Working for a Startup

19•Jessiejia11•2d ago•6 comments

Ask HN: Tips for transitioning from web development to embedded/firmware?

6•llmblockchain•1d ago•5 comments

Tell HN: /tmp is hogging your RAM on Ubuntu 26

9•boldi•1d ago•3 comments

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

306•david927•1w ago•1114 comments

Claude Gets Hella Paranoid

19•noduerme•1d ago•11 comments

Developing Browser Extensions

3•LayerTake•1d ago•3 comments

Anthropic (ANT) stock lists at nearly $2T valuation

39•_hmj•13h ago•11 comments

I open-sourced an AI loop for RISC-V CPU design months prior to OpenAI

9•fsbonetto•1d ago•1 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