frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Is there a name for the type of comments agents add where they leak the prompt?

9•xdennis•3h ago•3 comments

Ask HN: How are thinking efforts implemented?

93•simianwords•6d ago•29 comments

Ask HN: Which cheap Chinese LLM are you using?

5•linzhangrun•1h ago•0 comments

I'm Eric Ries, author of "The Lean Startup" and new book "Incorruptible" – AMA

793•eries•3d ago•570 comments

Ask HN: Favorite text heavy blogs that are a joy to read?

111•joshmarinacci•4d ago•28 comments

Ask HN: Want to build something open source on nights and weekends together?

38•vira28•2d ago•14 comments

AWS Bedrock to require sharing data with Anthropic for Mythos and future models

422•TomAnthony•3d ago•253 comments

Ask HN: Why hasn't there been a real competitor to Ticketmaster yet?

262•mdni007•5d ago•239 comments

Notes on DeepSeek

206•vinhnx•3d ago•140 comments

Ask HN: Did we witness the "Trinity moment" for AI?

18•vld_chk•9h ago•21 comments

Tell HN: iOS devs, get back lots of disk space: xcrun simctl delete unavailable

4•amichail•9h ago•0 comments

Ask HN: Would it be useful to have a slop button in addition to flag?

34•BugsJustFindMe•3d ago•23 comments

Ask HN: Are most corporate SWE jobs performative?

247•hnthrow10282910•3d ago•282 comments

Ask HN: What is the AI adoption approach at your org?

4•iExploder•11h ago•4 comments

Did anyone went to YC directly from Sri Lanka?

3•geethikaisuru•12h ago•0 comments

Ask HN: How do you get into a flow state when using AI to code?

89•kilroy123•2d ago•115 comments

I procrastinate by building tools to stop me from procrastinating: A sad story

20•thisislorenzov•2d ago•9 comments

Ask HN: What are tools you have made for yourself since the advent of AI?

440•aryamaan•5d ago•763 comments

Ask HN: How to avoid stressing yourself because of a micromanager?

4•ciwolex•5h ago•2 comments

Ask HN: What would you do with a trillion dollars

10•brudgers•8h ago•15 comments

Ask HN: Are you still using a Vision Pro?

170•y1n0•4d ago•214 comments

Ask HN: How to deal with App Store rejections?

4•high_byte•17h ago•1 comments

Ask HN: Is anyone shorting the overspend in AI yet?

17•ggm•2d ago•14 comments

What if we legally required politicians to work regular jobs 2 months a year?

9•ekoeko•19h ago•9 comments

Ask HN: Phishing from 646-257-4500

6•latchkey•1d ago•1 comments

Ask HN: I Need Help for a Product

8•memoryleakgame•1d ago•5 comments

Ask HN: If you had a trillion dollars, what would you do?

4•brudgers•8h ago•3 comments

Ask HN: What features do you miss in Google Docs for desktop?

4•mci•21h ago•1 comments

Ask HN: Is there a metric for AI code quality?

6•fractalf•2d ago•5 comments

Ask HN: Influence of Legend of Zelda in Backrooms Movie?

6•dieselgate•1d ago•1 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