frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: In your experience, what are sound conventions for e-ink UI development?

53•BoxOfRain•3d ago•9 comments

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

295•david927•1d ago•1043 comments

SETI@Home was the coolest thing

13•b112•5h ago•2 comments

Ask HN: Manager Blueprint

2•edimaudo•2h ago•0 comments

Ask HN: Is there a marketable "skill" to using AI?

2•purplemoonx•2h ago•1 comments

Anger over Data Centers Is Fueling a New Political Movementtca

7•doener•3h ago•4 comments

Ask HN: Is Traditional SaaS Dying?

4•vibe_that_works•6h ago•2 comments

Did Apple Search engine bot enter the security LLM fuzzing gauntlet

3•duttonw•8h ago•0 comments

Ask HN: How do you set comp at an early stage startup?

4•jeffreyfate•17h ago•3 comments

Ask HN: What Project are you the most proud of?

5•emn4tor•17h ago•10 comments

Ask HN: Recommended Merchant of Record and Affliate Setup

4•tisdadd•21h ago•4 comments

Ask HN: My dev blog has 11k followers. I stopped writing it. What would you do?

8•zlatkov•1d ago•8 comments

Ask HN: How do you go from writing code to deploying with agents?

15•sakuraiben•1d ago•10 comments

The State of Google

14•3dedb728-3f77•1d ago•9 comments

Ask HN: Is Ask HN Shrinking?

19•keiferski•2d ago•16 comments

Ask HN: Should a coding client import another client's rules by default?

2•ryanmerket•21h ago•0 comments

Ask HN: Why is Open POWER Foundation a wasteland?

9•climate_denier_•1d ago•2 comments

Ask HN: Anyone that has built a marketplace, what has been your experience?

7•mfisc_019•1d ago•3 comments

Ask HN: What is your database size

8•kureikain•1d ago•3 comments

The Systemic Collapse of the AI Industry: Ideology, Hardware, and CapEx Crisis

6•impartial2602•1d ago•1 comments

Ask HN: Should AI's tell you they're AI?

9•logicallee•1d ago•6 comments

Ask HN: Is this normal HN ranking?

4•unclebucknasty•13h ago•6 comments

Agentcn – Installable AI Agents

4•anayat•1d ago•0 comments

DeepSeek announced to raise its API price tremendously

32•alexwwang•4d ago•25 comments

Mossad accicentally injected data to a French lawyer phone instead of extracting

23•0x54MUR41•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