frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Everyone feared AI taking over; the real danger is AI serving just the few

34•PhilipDaineko•5h ago•15 comments

The open source DOCX editor submitted to HN a few weeks ago has been deleted

98•gcanyon•1d ago•43 comments

Ask HN: Smallest amount of working ML weights that can be tattooed on a body?

5•thoughtpeddler•7h ago•0 comments

Recursive self improvement for human skills

3•rando77•5h ago•1 comments

Ask HN: Is "no source code was copied" still a sufficient copyright defense?

64•oscgam1•1d ago•78 comments

Ask HN: Where is the programming profession going?

143•syntaxbush•2d ago•158 comments

I patched llama.cpp to gain 20% prompt processing TPS. Help me make a PR

4•i_am_rocoe•6h ago•2 comments

Ask HN: MacBook vs. Dedicated GPU for LLM

31•mzubairtahir•22h ago•62 comments

Ask HN: What GUI/desktop app do you use to keep track of different AI sessions?

3•howToTestFE•16h ago•4 comments

Data Privacy while using API tools

4•11shyam11•11h ago•4 comments

Ask HN: What do you predict the world will look like in 5-10 years?

6•justanything•12h ago•8 comments

Tell HN: Mojo is becoming open source

7•theanonymousone•12h ago•3 comments

Ask HN: Is there a quiet market for 'no enforced AI' dev jobs?

7•reinhardt•13h ago•10 comments

Ask HN: How much coding should beginners learn in the AI era?

36•JohnDSDev•3d ago•46 comments

Ask HN: Running local LLMs? What's your model and hardware

10•alfiedotwtf•12h ago•7 comments

Ask HN: Has Ilya Sutskever spoken publicly lately?

6•aurenvale•17h ago•0 comments

Tell Zillow: Fee-Simple vs. Leasehold Filter

3•HoldOnAMinute•1d ago•1 comments

Ask HN: Norway bans AI in elementary schools

15•mellosty•2d ago•18 comments

Roblox parental controls are a dystopian security disaster

23•notsure357•1d ago•3 comments

Ask HN: Why did you learn Chinese?

5•alonsovm44•6h ago•1 comments

Ask HN: Who remembers Fry's Electronics – the "church" of IT people?

7•netfortius•1d ago•4 comments

Ask HN: Which AI concepts are here to stay, and which will churn?

4•datsci_est_2015•1d ago•7 comments

Ask HN: Techniques for learning things quickly using coding agents?

3•throwaw12•1d ago•1 comments

I feel like VSCode is falling apart

15•othmanosx•2d ago•16 comments

Ask HN: What home printer do you use/recommend?

19•niyazpk•4d ago•23 comments

Ask HN: How is GPU power draw measured at scale?

5•anax32•1d ago•2 comments

Decoupling Compute and Memory for Async GPUs

8•yiyingzhang•2d ago•2 comments

Ask HN: Why does every AI demo sound perfect but real world deployment always

7•VaderAi•1d ago•11 comments

Ask HN: What surprised you about Estonia e-Residency and running an Estonian OÜ?

81•jvilalta•2d ago•76 comments

Ask HN: Anthropic banned me from using Claude Code and I don't know what to do

81•ayi•4d ago•93 comments
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