frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Why are so many services using email magic links for login?

6•bfbf•1h ago•6 comments

Ask HN: Are the trades a safe career transition?

66•Rd6n6•1d ago•106 comments

Merchants. 12 Months. Zero Fees

3•MarketPay•1h ago•0 comments

Does anyone gets hired with himalaya, well found or other remote hiring sites?

2•rohansrma•1h ago•0 comments

Coworker rejects PR (one month in) because it does not meet his standards

16•LandOfMightDev•8h ago•27 comments

Ask HN: Tips for transitioning from web development to embedded/firmware?

152•llmblockchain•5d ago•93 comments

Ask HN: I have been unemployed for 2y. 15 years of experience, US. What to do?

746•LetThingsBeDiff•3d ago•853 comments

Tell HN: Claude Opus 4.5 turns one year old today

7•zkldi•10h ago•0 comments

Tell HN: Today marks the first anniversary of Opus 4.5's release

4•gokhan•2h ago•1 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

134•proberts•3d ago•177 comments

Ask HN: Is a college degree still necessary for a programmer?

5•vmuhammadsaid20•12h ago•16 comments

What is the likelihood LLMs exploited the learn software to verify their Riemann

2•rsoto2•15h ago•2 comments

Ask HN: Did Amazon Get Hacked?

3•lacoolj•17h ago•1 comments

Ask HN: What Are You Learning?

7•deepakkoli93•18h ago•12 comments

Ask HN: How likely are we to see a major quantum attack on modern crypto?

3•ijustlovemath•18h ago•3 comments

Are you clinging to the TUI to feel like a developer?

6•TomEleff•1d ago•16 comments

Ask HN: How are tech recruiters assessed on their recruiting skills?

2•_override•1d ago•3 comments

Ask HN: Is Anthropic being public better or worse for your org?

8•ares623•2d ago•11 comments

Tell HN: OpenRouter prompts to Minimax may have been read

75•dannyw•3d ago•11 comments

Tell HN: Google Earth now has 14 days weather forecast

2•szemy2•15h ago•0 comments

Ask HN: Where the company's employees launch the tools that Claude created

5•vmuhammadsaid20•2d ago•6 comments

Ask HN: Are startups today worth it even in a best case scenario?

6•enigmous_hippo•1d ago•5 comments

GitLab 19.6.0 is out and still vulnerable to Ruby2Shell and NGINX2Root

29•hoechst•4d ago•8 comments

Ask HN: Should Uber Ratings Decay over Time?

14•AB3TZ•3d ago•7 comments

Ask HN: Any actual balanced reviews of GTA 6?

13•tetris11•3d ago•26 comments

Does anybody read their emails anymore?

8•ky0ung•2d ago•28 comments

Ask HN: What's stopping us from putting agents in general purpose robots?

12•ex-aws-dude•3d ago•7 comments

Ask HN: Has Opus 5.5 Been Nerfed?

4•Adam-Hincu•1d ago•5 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