RCRAG Converter

RAG for PDF documents: what extracts, and what silently does not

PDFs split into two kinds for RAG: those with a text layer, which extract cleanly, and scanned PDFs, which are images of text and yield nothing at all without OCR.

Two file types wearing one extension

A PDF produced by Word, LaTeX or a browser stores its words as text, positioned on a page. A PDF produced by a scanner or a phone camera stores a photograph of those words. Both end in .pdf and both look identical when you open them, and only the first can be read without OCR.

How to tell which one you have

Open it and try to select a sentence with your cursor. If the text highlights, there is a text layer and it will convert. If your selection draws a rectangle over the page instead, it is an image and a converter will extract nothing from it - not an error, just an empty result.

Why a scanned PDF produces nothing rather than an error

A converter can decode the page perfectly, confirm the file is valid, and still find no text in it, because there is none - the words are pixels. The dangerous outcome is a tool that indexes the page anyway with a placeholder, because those placeholder passages are nearly identical to one another and crowd real answers out of search results. RAG Converter skips them and says which files it skipped.

Layout is the other half of the problem

Even with a text layer, a PDF stores position rather than reading order. Two-column academic papers, tables and footnotes can extract in an order no human would read them in, which then chunks into passages that mix unrelated sentences. Check a sample of your output before converting a library.

More on converting for RAG

  • rusty_ragdocument ingest, chunking and retrieval
  • rusty_xmlWord, PowerPoint and Excel, without LibreOffice
  • rusty_jpeg / rusty_pngimage decode
  • rusty_flacaudio decode
  • rusty_zstdcompression
  • rusty_allocthe allocator, in wasm too
  • rusty_timeNTP timestamps on every chunk
  • spacedbthe storage seam, CRDT per entry
  • FFAIthe AI toolkit the three engines below come from
  • CarmentaOCR - reads scans and screenshots, in your browser
  • Mercuryspeech recognition - turns recordings into transcripts
  • Argusvision - describes images and video frames

MATA Corporate Holdings © 2026 — Made in Scottsdale, Arizona

Remade with Rust