What is PDF Text Extraction?
PDF text extraction reads character information already represented in a PDF and exports it into another form, such as plain text or positioned text records. OCR instead recognizes characters from page images.
How PDF Text Extraction works
A PDF describes how to paint a page, which is not necessarily the same as storing its paragraphs in reading order. Extraction maps character codes to Unicode and reconstructs an order using available document structure or geometry. Columns, unusual font encodings, and positioned glyphs can produce surprising results. A scan may contain only raster images until a separate OCR process creates text data.
Key facts
- Extracted text can be incomplete or wrongly ordered even when the page looks correct. Font rendering and character interpretation use different information.
- A text or JSON result is a separate artifact. It does not by itself add a searchable text layer to the source PDF.
- Mixed documents can contain both text pages and image-only pages. A document-level fallback triggered only by an entirely empty extraction can miss scanned pages.
When PDF Text Extraction matters
Try native extraction for digitally generated PDFs and evaluate OCR for scans or missing text. Check representative pages rather than treating any nonempty result as complete document coverage.
How Transloadit helps with PDF Text Extraction
Transloadit’s /document/extract Robot selects a method with text_method: "native" reads selectable PDF text, "ocr" delegates to /document/ocr, and "auto" tries native extraction before falling back when text is missing or detected as unusably letter-spaced, such as s p a c e c r a f t. "ocr" and "auto" both require ocr_provider.
auto decides for the whole document, so it can miss image-only pages in a PDF that also contains usable native text; choose "ocr" when every page needs recognition. For text extraction, OCR modes ("ocr" and "auto") cannot be combined with password, page_range, or text_granularity: "page". OCR processes the full document; page_range applies to native text and embedded image extraction. Neither Robot adds a searchable layer to the original PDF; /document/ocr returns JSON, metadata, or plain text.
Explore Transloadit’s file formats & compression capabilities