frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

How to get more coding productivity with LLMs

3•DaveParkCity•59m ago•0 comments

Ask HN: Is everybody's Claude weekly quota reset time the same?

4•0gs•2h ago•1 comments

Ask HN: Anyone else tired of brands discontinuing your favorite everyday items?

44•GreenPencil7•13h ago•35 comments

Ask HN: What do you use for privacy focused analytics?

2•garyhbutton•3h ago•3 comments

Ask HN: Stop Looking at Code?

2•grandimam•3h ago•3 comments

Ask HN: Looking for testers for my RAM-based Linux distribution

2•sumtas•3h ago•0 comments

Ask HN: Which Jabber clients support SCRAM+ and XEP-0474?

2•Bender•3h ago•0 comments

Senior Dev Imposter Syndrome

4•daltonlcarr•3h ago•0 comments

Transfer context from one agent to another agent mid task

3•iamalizaidi•3h ago•0 comments

YC startup offers interviews to people who get their name permanently tattooed

6•codexon•4h ago•4 comments

Belkin killed my smart switch. I got it working again without their app

11•gaborme•9h ago•1 comments

Robotics development made dead simple (open source)

22•Ekami•3d ago•7 comments

Ask HN: What have you been curious about?

7•adityaathalye•5h ago•11 comments

Ask HN: Experience with MSFT Security Copilot and the new response capabilities?

3•tty46•8h ago•0 comments

Old.reddit.com is now requiring users to log in

4•ethagnawl•3h ago•5 comments

A disturbing thought. A world where the marginal cost of software is free

2•toddh•8h ago•11 comments

Ask HN: How would you learn AI-assisted development from the ground up?

5•SMAAART•8h ago•6 comments

Four Competing AIs Answer 1 Classic Question

2•notsydonia•9h ago•0 comments

Ask HN: Do you think Opus 5 will improve?

5•logicallee•9h ago•0 comments

Ask HN: Crooked Timber showed showed me a virus captcha, What now?

43•Jgoauh•1d ago•47 comments

Ask/Tell HN: use the flag button instead of complaining about AI slop articles

11•rglullis•8h ago•7 comments

AGI has arrived. We just call it backpropagation

3•thomastill•3h ago•5 comments

Agent and RAG for Obsidian, Need Feedback

3•athrv_shrn•11h ago•1 comments

Ask HN: My domain registrar rug-pulled me for $3000 [fixed]

59•shrinks99•8h ago•58 comments

Ask HN: Crazy as a Service – does it exist?

3•Towaway69•12h ago•2 comments

Fund Momentum MCP: Live VC Fund Data for AI Agents

3•darius88•12h ago•1 comments

Tell HN: Our paid Claude AI subscription unavailable >1 week and no support

45•KellyCriterion•1d ago•21 comments

Ask HN: Is paying for a BIMI certificate useful?

4•gojkoa•13h ago•0 comments

Im 14 and I want to create AI for students

5•grgnend•15h ago•5 comments

Why I prefer Opus 5 to Fable 5

22•novlrdotcom•1d ago•13 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