frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

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

320•sharts•3d ago•260 comments

Ask HN: Alternatives to GitHub

643•dhruv3006•3d ago•431 comments

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

3•diselody•8h ago•4 comments

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

52•Abh1Works•5d ago•87 comments

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

653•stagas•4d ago•202 comments

Qwen3.8 Fetches Weird URLs

6•Luker88•10h ago•0 comments

InstantDB Is Shutting Down

8•redindian75•10h ago•1 comments

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

4•darkLord19•11h ago•2 comments

Are you good at AI, or just using it?

10•ppezaris•11h ago•9 comments

Idea to reduce AI token use at large orgs

4•mgav•16h ago•0 comments

Ask HN: One SSH key or many SSH keys?

3•htunnicliff•12h ago•3 comments

Google Cloud us-west1 down

13•anurag•13h ago•5 comments

Ask HN: No Path from Techie to Management?

5•seeking_gruntle•14h ago•11 comments

Ask HN: Is AI the New Spreadsheet?

7•Gshaheen•14h ago•4 comments

Ask HN: Do you automate your prospection or doing hand made?

3•mathieu_aithos•14h ago•0 comments

Is this AWS RI/SP simulation engine interesting / valuable?

2•Exstratus•16h ago•1 comments

Algorithm Interview: a conversation between two parrots

3•dersoverflow•17h ago•0 comments

There are 67 items to manually delete in Google My-Activity

2•whyagaindavid•21h ago•0 comments

Ask HN: What's the endgame of the AI comments buried in every post?

14•elar_verole•1d ago•13 comments

Ask HN: Has anyone shipped a self-modifying application with LLMs?

10•ex-aws-dude•1d ago•13 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