frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Tell HN: Airbnb updated "necessary" cookies aren't

3•janalsncm•3h ago•0 comments

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

47•GreenPencil7•22h ago•38 comments

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

9•codexon•12h ago•6 comments

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

5•0gs•10h ago•5 comments

Robotics development made dead simple (open source)

22•Ekami•3d ago•7 comments

Do newer coding models end up training on the AI slop generated by older models?

6•tbharath•7h ago•6 comments

Sfwig – had a laugh with AI, then a question

3•eilepsalpeh•7h ago•2 comments

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

4•Bender•12h ago•0 comments

For the cheap price of a permanent tatto, get access to job interview

14•NoRagrets•8h ago•13 comments

Ask HN: Is Reddit trying to kill old Reddit?

9•lostaccount•5h ago•7 comments

How to get more coding productivity with LLMs

5•DaveParkCity•9h ago•1 comments

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

12•gaborme•17h ago•1 comments

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

2•garyhbutton•11h ago•7 comments

Ask HN: Stop Looking at Code?

3•grandimam•11h ago•7 comments

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

2•sumtas•12h ago•0 comments

Senior Dev Imposter Syndrome

4•daltonlcarr•12h ago•1 comments

Transfer context from one agent to another agent mid task

3•iamalizaidi•12h ago•0 comments

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

43•Jgoauh•1d ago•47 comments

Ask HN: What have you been curious about?

10•adityaathalye•14h ago•20 comments

The World Is to Focused on Quarterly Earnings

3•Taikhoom2010•7h ago•2 comments

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

45•KellyCriterion•2d ago•22 comments

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

3•tty46•16h ago•0 comments

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

2•toddh•17h ago•13 comments

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

6•SMAAART•17h ago•6 comments

Four Competing AIs Answer 1 Classic Question

2•notsydonia•17h ago•0 comments

Ask HN: Do you think Opus 5 will improve?

5•logicallee•17h ago•0 comments

Agent and RAG for Obsidian, Need Feedback

3•athrv_shrn•19h ago•1 comments

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

3•Towaway69•20h ago•3 comments

Fund Momentum MCP: Live VC Fund Data for AI Agents

3•darius88•20h ago•1 comments

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

11•rglullis•17h ago•8 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