News for hackers. Stuff that matters.
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by david_draco on Sunday August 17, 2025 @06:53PM (#44935656)
Looking at the code, this converts PDF pages to images, then transcribes each image. I might have expected a pdftotext post-processor. The complexity of PDF I guess ...
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by firesteelrain on Sunday August 17, 2025 @06:58PM (#44935692)
There is a very popular Python module called ocrmypdf. I used it to help my HOA and OCR’ing of old PDFs.

https://github.com/ocrmypdf/OCRmyPDF

No LLMs required.

Re:Llama-Scan: Convert PDFs to Text W Local LLMs by cess11 on Monday August 18, 2025 @03:43AM (#44938293)
It's nice, I've used it as a fallback text extraction method in an ETL flow that chugged through tens of thousands of corporate and legal PDF files.
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by dreamcompiler on Tuesday August 19, 2025 @12:17AM (#44948208)
20 years ago I tried in vain to get my HOA to use the virtual printer for PDF documents so they'd be searchable. The capability was built in to both Mac and Windows even way back then.

No luck. They just could not grasp it. So they kept using their process of printing out the file on paper and then scanning it back in as a PDF image file.

I finally quit trying. Now of course they've seen the light and are painstakingly OCRing all that old stuff.

Re:Llama-Scan: Convert PDFs to Text W Local LLMs by firesteelrain on Tuesday August 19, 2025 @07:44AM (#44950512)
Ouch! I am on the BOD so as an IT/Engineering Professional I can influence things better
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by enjaydee on Sunday August 17, 2025 @07:46PM (#44935929)
Saw this tweet the other day that helped me understand just how crazy PDF parsing can be

https://threadreaderapp.com/thread/1955355127818358929.html

Re:Llama-Scan: Convert PDFs to Text W Local LLMs by constantinum on Sunday August 17, 2025 @10:42PM (#44936877)
There are a few other reasons why PDF parsing is Hell! > https://unstract.com/blog/pdf-hell-and-practical-rag-applica...
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by moritonal on Sunday August 17, 2025 @07:30PM (#44935853)
I imagine part of the issue is how many PDFs are just a series of images anyway.
Re:Llama-Scan: Convert PDFs to Text W Local LLMs by westurner on Sunday August 17, 2025 @07:21PM (#44935802)
Shell: GNU parallel, pdftotext

Python: PyPdf2, PdfMiner.six, Grobid, PyMuPdf; pytesseract (C++)

paperetl is built on grobid: https://github.com/neuml/paperetl

annotateai: https://github.com/neuml/annotateai :

> annotateai automatically annotates papers using Large Language Models (LLMs). While LLMs can summarize papers, search papers and build generative text about papers, this project focuses on providing human readers with context as they read.

pdf.js-hypothes.is: https://github.com/hypothesis/pdf.js-hypothes.is:

> This is a copy of Mozilla's PDF.js viewer with Hypothesis annotation tools added

Hypothesis is built on the W3C Web Annotations spec.

dokieli implements W3C Web Annotations and many other Linked Data Specs: https://github.com/dokieli/dokieli :

> Implements versioning and has the notion of immutable resources.

> Embedding data blocks, e.g., Turtle, N-Triples, JSON-LD, TriG (Nanopublications).

A dokieli document interface to LLMs would be basically the anti-PDF.

Rust crates: rayon handles parallel processing, pdf-rs, tesseract (C++)

pdf-rs examples/src/bin/extract_page.rs: https://github.com/pdf-rs/pdf/blob/master/examples/src/bin/e...

Re:Llama-Scan: Convert PDFs to Text W Local LLMs by ethan_smith on Monday August 18, 2025 @12:55AM (#44937539)
Image-based extraction often preserves layout and handles PDFs with embedded fonts, scanned content, or security restrictions better than direct text extraction methods.