frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: How do independent engineers make a living from open-source work?

5•imparikalp•51m ago•2 comments

Ask HN: What software and hardware are you sing for self hosted LLM rigs?

37•NegativeLatency•1d ago•14 comments

Advice buying local AI machine

7•jay_kyburz•11h ago•9 comments

Ask HN: Android takes 14GB on my phone. Why does it not include a manual?

18•RetroTechie•1d ago•7 comments

Ask HN: When do you find it sane to delegate to AI?

6•couleur•16h ago•16 comments

Ask HN: What would make ads on a web site more tolerable?

4•psion•19h ago•16 comments

Ask HN: How can you prepare for the coming security apocalypse?

12•DeepLogin•22h ago•20 comments

Ask HN: If 2048-bit RSA were cracked, what would be the consequences?

11•partsch•1d ago•7 comments

Ask HN: What cool smart home integrations do you have?

4•janalsncm•13h ago•4 comments

Ask HN: What's your favorite sci-fi book about life after the singularity?

4•coreyrab•10h ago•6 comments

Ask HN: Where is all the amazing AI-generated software?

36•8bitbeep•5d ago•76 comments

Ask HN: Why bother with new programming languages?

16•avilay•2d ago•21 comments

Ask HN: Is RSA in Jeopardy?

26•lyfeninja•5d ago•17 comments

Ask HN: Founders who shut down a company, what did you do with the code?

8•sethross•1d ago•6 comments

Tell HN: Don't use AI to write your comments or they'll get automatically killed

45•nathan_f77•2d ago•69 comments

Ask HN: Any courses/products by indie makers worth getting today?

85•akudha•4d ago•43 comments

Ask HN: Coworker rejects PR (a month in) because it does not meet his standards

23•LandOfMightDev•1w ago•46 comments

DietPi released a new version v10.9

21•stephanstsdietp•4d ago•3 comments

DNS Made Easy: Reset Your Password and Generate New API Keys

8•jinnko•1d ago•3 comments

Ask HN: Who is still worried about copyright issues with AI generated code?

6•sonjaqql•2d ago•8 comments

Ask HN: Why haven't LLMs made any CS breakthroughs?

10•elcritch•2d ago•5 comments

Why does Claude have a 4 hour limit?

8•tombakerbuilds•1d ago•3 comments

If you're doing Monte Carlo try Knuth LGC

8•logicallee•3d ago•1 comments

Ask HN: Am I the only one whose AI hype is cooling down a lot?

41•redleathercouch•6d ago•30 comments

Ask HN: Is anyone using Gemini Live (3.8) in scaled production

5•aenis•2d ago•0 comments

Ask HN: Is ChatGPT output format for chats purposely nerfed?

3•MrCoffee7•2d ago•12 comments

Ask HN: How do you handle corporate life?

11•busssard•5d ago•11 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