frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: Favorite aspects of Cocoa/NeXTSTEP for app dev?

3•elcritch•4h ago•0 comments

Ask HN: What are your favourite Hacker News comments?

3•Imustaskforhelp•4h ago•3 comments

Ask HN: Will programmers write more efficient code during the memory shortage?

146•amichail•1d ago•239 comments

Ask HN: How to get ideas for space startups?

5•asxndu•7h ago•5 comments

Ask HN: After you ship a feature, what happens to what you learned?

9•gaggle_dk•12h ago•7 comments

Ask HN: Is anyone using the A2A protocol?

92•asim•3d ago•41 comments

Ask HN: What tools are you using for AI-assisted code review?

23•agos•2d ago•22 comments

Ask HN: What is your #1 practical lesson or "aha" moment from coding with AI?

7•johndavid9991•14h ago•10 comments

Ask HN: What do you care about? What is your joy and purpose?

9•bix6•21h ago•20 comments

Ask HN: Do you use Claude Code, Codex, or something else?

5•JohnDSDev•15h ago•21 comments

Ask HN: If AI didn't exist, what would you be building today?

4•akashwadhwani35•6h ago•9 comments

Ask HN: What technique do you use to make Claude Code deterministic?

4•hbarka•20h ago•5 comments

Ask HN: Is Claude Code with Fable 5 worth switching back from Codex?

6•vantareed•8h ago•3 comments

Ask HN: How to handle kernel struct changes (e.g. iov_iter) in eBPF?

3•morolis•21h ago•2 comments

Forked CozoDB to give agents cognitive primitives

3•shanrizvi•1d ago•0 comments

Ask HN: Need advice on distributing and testing what I build

5•darth-pixit•1d ago•2 comments

Ask HN: What is the coolest tech progress outside AI?

15•vantareed•1d ago•9 comments

Ask HN: Is anyone else leaving AUR?

8•lordkrandel•2d ago•6 comments

Ask HN: Due to spam on GitHub, what platforms can I move my projects?

58•ciwolex•18h ago•60 comments

Ask HN: I'm lost. How can I define ICP (Ideal Customer Profile)?

5•snowhy•2d ago•6 comments

Ask HN: Is there a way to stop the animated Google Doodles?

12•arnejenssen•2d ago•13 comments

Ask HN: Open-Source Intelligence

3•silent_butagrim•1d ago•5 comments

Ask HN: Is there a recognized standard for swarm intelligence benchmarking?

5•stephanieriggs•1d ago•1 comments

Ask HN: How do you effectively communicate or present?

10•hnthrow10282910•2d ago•9 comments

Anthropic pauses credit change for Claude Code

36•fabianlindfors•5d ago•12 comments

Ask HN: Conflicted about founding engineer role

8•gondolin1683•2d ago•18 comments

Ask HN: Do you find vibe coding / agentic engineering to be fulfilling?

11•uejfiweun•2d ago•13 comments

Reviews have become expensive, rewrites have become cheap

82•_z6bq•5d ago•74 comments

Self-adapting and mutating LLM based viruses/worms

3•rozumbrada•2d ago•4 comments

Ask HN: What's a prompt you've written that you're genuinely proud of?

11•akashwadhwani35•3d ago•7 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