frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: Who Is Using XMPP?

3•nunobrito•2h ago•2 comments

Ask HN: Starting a New Role with Ada

3•NoNameHaveI•2h ago•1 comments

Ask HN: Programmable Watches with WiFi?

33•dakiol•3d ago•22 comments

Ask HN: Have top AI research institutions just given up on the idea of safety?

69•DietaryNonsense•3h ago•77 comments

1Password pricing increasing up to 33% in March

131•otterley•1d ago•181 comments

New Claude Code Feature "Remote Control"

6•rob•16h ago•0 comments

AI isn't killing SaaS – it's killing single-purpose SaaS

9•JB_5000•18h ago•7 comments

Ask HN: Chromebook leads for K-8 school in need?

45•techteach00•2d ago•44 comments

Ask HN: Share your productive usage of OpenClaw

84•aavci•14h ago•65 comments

Ask HN: How do you know if AI agents will choose your tool?

31•dmpyatyi•1d ago•23 comments

Persistent Prompts and Built in Search

2•lazybusy•16h ago•0 comments

Ask HN: Is it worth avoiding AI while making a game?

5•2muchclout•19h ago•14 comments

Using "Hi Claudette " on Claude.ai

4•mlongval•20h ago•3 comments

ChatGPT finds an error in Terence Tao's math research

41•codexon•1d ago•8 comments

Looking 4 open-source knowledge base and project management tool 4 personal use

4•TheAlgorist•21h ago•4 comments

Ask HN: Any DIY open-source Alexa/Google alternatives?

8•personality0•1d ago•4 comments

Would you choose the Microsoft stack today if starting greenfield?

17•JB_5000•1d ago•18 comments

Ask HN: How are you controlling AI agents that take real actions?

5•thesvp•1d ago•17 comments

Ask HN: What Linux Would Be a Good Transition from Windows 11

13•Cyberis•1d ago•18 comments

Ask HN: Who has seen productivity increases from AI

7•Kapura•1d ago•11 comments

Ask HN: Are AI "Chatbot Wrappers" ruining EdTech? I'm testing a proactive UX

2•Swadesh9422•1d ago•3 comments

Ask HN: Is it better to have no Agent.md than a bad one?

6•parvardegr•2d ago•8 comments

Comparing manual vs. AI requirements gathering: 2 sentences vs. 127-point spec

2•thesssaism•1d ago•4 comments

Ask HN: Missing page from Practical Computing magazine (1980)

3•sim04ful•1d ago•0 comments

Does anyone use CrewAI or LangChain anymore?

9•rakan1•1d ago•5 comments

Ask HN: Why doesn't HN have a rec algorithm?

9•sujayk_33•3d ago•22 comments

What are the best coping mechanisms for AI Fatalism?

36•johnb95•4h ago•92 comments

Ask HN: What is up with all the glitchy and off-topic comments?

10•marginalia_nu•1d ago•3 comments

Ask HN: What breaks when you run AI agents unsupervised?

12•marvin_nora•3d ago•8 comments

What podcasts are you listening to?

2•thomk•3d ago•3 comments
Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

4•martinald•9mo 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•9mo 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•9mo ago
give https://pg.llmwhisperer.unstract.com/ a try