By 1990 Omnipage 3 and its successors were 'good enough' and with their compact dictionaries and letter form recognition were miracles of their time at ~300MB installed. In 2025 LLMs can 'fake it' using Trilobites of memory and Petaflops. It's funny actually, like a supercomputer being emulated in real time on a really fast Jacquard loom. By 2027 even simple hand held calculator addition will be billed in kilowatt-ho…
A bit ago I tried throwing a couple of random simple Japanese comics (think 4koma but I don't think either of the ones I threw in were actually 4 panels) from Pixiv into Gemma 3b on AI studio. - It transcribed all of the text, including speech, labels on objects, onomatopoeias in actions, etc. I did notice a kana was missing a diacritic in a transcription, so the transcriptions were not perfect, but pretty close actu…
Llama-Scan: Convert PDFs to Text W Local LLMs
71–80 of 86 posts
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#72I’ve done a similar PDF → Markdown workflow. For each page: - Extract text as usual. - Capture the whole page as an image (~200 DPI). - Optionally extract images/graphs within the page and include them in the same LLM call. - Optionally add a bit of context from neighboring pages. Then wrap everything with a clear prompt (structured output + how you want graphs handled), and you’re set. At this point, models like GPT…
>are cheap and strong enough to make this practical. It all depends on the scale you need them, with the API it's easy to generate millions of tokens without thinking.
I can recommend the Mistral OCR API [1] if you have large jobs and don't want to think about it too much.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#73The crucial information is missing - accuracy comparison with other OCR providers. From my experience LLM based OCR might misread the layout and hallucinate values, it is very subtle but sometimes critically wrong. Classical OCR has more precision but doesn't get the layout at all. Combining both has other issues, no approach is 100% reliable.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#74TRANSCRIPTION_PROMPT = """Task: Transcribe the page from the provided book image.
- Reproduce the text exactly as it appears, without adding or omitting anything. - Use Markdown syntax to preserve the original formatting (e.g., headings, bold, italics, lists). - Do not include triple backticks (```) or any other code block markers in your response, unless the page contains code. - Do not include any headers or footers (for example, page numbers). - If the page contains an image, or a diagram, describe it in detail. Enclose the description in an tag. For example:
This is an image of a cat.
"""
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#75Yet another Prompt Wrapper TRANSCRIPTION_PROMPT = """Task: Transcribe the page from the provided book image. - Reproduce the text exactly as it appears, without adding or omitting anything. - Use Markdown syntax to preserve the original formatting (e.g., headings, bold, italics, lists). - Do not include triple backticks (```) or any other code block markers in your response, unless the page contains code. - Do not in…
The url to connect to ollama seems to just be hard coded so I don't see why you couldn't point this at a different machine on your network rather than having Ollama running locally on every machine you need this for like the readme implies.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#76It's basically an SQL wrapper around poppler.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#77The crucial information is missing - accuracy comparison with other OCR providers. From my experience LLM based OCR might misread the layout and hallucinate values, it is very subtle but sometimes critically wrong. Classical OCR has more precision but doesn't get the layout at all. Combining both has other issues, no approach is 100% reliable.
Any tool that takes a scanned PDF, then overlay's OCRed text over scan so that text becomes searchable?
>OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched
I ... I nailed it.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#78Earlier quoted context omitted.
Any tool that takes a scanned PDF, then overlay's OCRed text over scan so that text becomes searchable?
https://github.com/ocrmypdf/OCRmyPDF >OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched I ... I nailed it.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#79The crucial information is missing - accuracy comparison with other OCR providers. From my experience LLM based OCR might misread the layout and hallucinate values, it is very subtle but sometimes critically wrong. Classical OCR has more precision but doesn't get the layout at all. Combining both has other issues, no approach is 100% reliable.
Have you evaluated this lately? Last year or even just earlier this year I would have mostly agreed with you. At this point, however, with at least the documents I have been working on, OCR reliability with GPT5 or Mistral OCR [1] has been much better than even domain-trained classical OCR. If the documents have even slightly complex layout (to say nothing of page numbers or page headings or an uncommon font), the ac…
What's interesting is that I asked it to also read the background colors of the cells and it did much worse on that task.
I believe these models could be useful for a first pass if you are willing to manually review everything they output, but the failure mode is unsettling.
Re: Llama-Scan: Convert PDFs to Text W Local LLMs
#80Earlier quoted context omitted.
If you think 1990's ocr- even 2000's OCR is remotely as good as modern OCR... I`v3 g0ta bnedge to sell.
I had an on-screen OCR app on my Amiga in the early 90s that was amazing, so long as the captured text image used a system font. Avoiding all the mess of reality like optics, perspective, sensors and physics and it could be basically perfect.
Also shows a way to do that fast:
“ First, he wrote assembly language routines to isolate the bounding box of each character in the selected range. Then he computed a checksum of the pixels within each bounding box, and compared them to a pre-computed table that was made for each known font, only having to perform the full, detailed comparison if the checksum matched.”