frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: Who's still keeping a DOS machine up because the business depends on it?

146•mlaux•16h ago•141 comments

Tell HN: OpenAI $500 ProMax plan listed in API

24•GustavHartz•1d ago•37 comments

Ask HN: Any nerds out there who've read a lot of research papers?

25•shriy-singh•1d ago•21 comments

Ask HN: Hypothesis: Cellular providers are deprioritizing voice calls?

19•tkdb•1d ago•37 comments

Ask HN: IEEE expulsion of Fei-Yue Wang?

10•sathomasga•1d ago•1 comments

Ask HN: Indie hackers on X (Twitter) feels like a mega bubble these days

4•sankalpdomore•2h ago•1 comments

Ask HN: Is Opus 5.5 another step change?

9•consumer451•14h ago•10 comments

Ask HN: How do you deal with cyber attacks once you scale?

4•cehgmaster•2d ago•2 comments

Ask HN: Which model do you use for work?

5•george_max•17h ago•7 comments

Ask HN: What vendor you'd switch out if a better option was available?

5•jviotti•18h ago•14 comments

FYI: OpenAI "spend limits" aren't always limits

2•iambateman•15h ago•0 comments

Tell HN: Chrome 154 corrupt Fontconfig cache and crash KDE Plasma

5•vdfs•15h ago•0 comments

Ask HN: LM Studio Bionic with Python?

2•HoldOnAMinute•16h ago•0 comments

Ask HN: Has anyone built a leaderless multi-agent system?

2•har-ki•19h ago•1 comments

Ask HN: Anyone else's OpenAI and Claude API keys mysteriously leaked last night?

2•par•22h ago•1 comments

Ask HN: How do you use LLMs to secure your code and services?

3•cpa•1d ago•1 comments

Ask HN: Is it impossible to disable Siri on macOS 27?

153•semidror•4d ago•87 comments

Ask HN: Migrating personal email domain from Gmail to iCloud?

4•osener•1d ago•4 comments

Ask HN: Are .shop domains down?

6•esher•1d ago•8 comments

Ask HN: Where to look for jobs?

5•0x737368•1d ago•1 comments

Ask HN: How do you feel about the new $500 OpenAI subscription?

4•preommr•1d ago•11 comments

Tell HN: Substack obfuscating text to break reading mode

17•xnx•3d ago•4 comments

Ask HN: What job boards are good these days?

22•phendrenad2•2d ago•16 comments

Anyone using a Wispr Flow alternative that is non-cloud?

22•itsjeremiahs•3d ago•17 comments

Ask HN: Does a startup need both founder and company X accounts?

3•OnionLayers•1d ago•0 comments

Ask HN: Do you cuss at your agent?

4•ak39•1d ago•9 comments

Ask HN: Folks familiar with infections after TKA

3•zafka•1d ago•0 comments

Ask HN: Does spec-driven development still pay off with frontier coding models?

3•sarangk90•1d ago•2 comments

When Claude CLI asks for feedback, responding authorizes conversation capture

25•mmaunder•4d ago•3 comments

Ask HN: When is fine-tuning a small LLM worth it?

10•kooldeep7•3d 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