Extracting text from PDF: what a text layer is and why some PDFs have none
When people say "extract text from PDF" they usually mean one of two things: copy the words out of a document, or pull the readable content so it can be reused elsewhere. Both depend on the same underlying thing — the PDF text layer — and understanding that one concept explains nearly every extraction problem.
This guide walks through what a text layer is, why some PDFs do not have one, how OCR creates one, and how to recognise when your extracted text is reliable.
What a text layer is
A PDF page can carry two kinds of content: the visible drawing and an optional text layer. The text layer stores each line of text as machine-readable characters with position and style information. When you select text in a PDF viewer, you are selecting from that layer.
Documents generated by office software, web browsers and print drivers almost always include a text layer. PDFs produced by scanning or by taking screenshots contain only pixels — they look like text but store no letters at all.
Why extraction returns nothing
- The page is a scan or photograph with no text layer.
- The PDF was exported from an image-heavy layout tool that omitted text.
- Text is encoded as outlines (converted to curves) so no characters remain.
- The file is encrypted and the viewer has no permission to extract text.
How OCR creates a text layer
OCR (optical character recognition) analyses the pixels of a page, recognises the shapes of letters, and writes a new text layer onto a copy of the PDF. After OCR the page looks the same but the words are selectable, searchable and extractable.
OCR quality depends on the source: clean, high-resolution, printed text recognises well; handwriting, low-contrast scans and decorative fonts recognise poorly. The recognised text is a machine guess, so important figures should always be verified against the visible page.
Getting clean text out
- Confirm the PDF has a text layer (try selecting text in a viewer).
- If it does not, run OCR first and download the searchable copy.
- Extract text with the tool, choosing a page range if you only need part.
- Paste into your editor and clean residual line breaks from column layouts.
- Verify numbers and names against the original page.
Multi-column and table layouts
Extraction reads in reading order where the PDF provides it, but multi-column newsletters and side-by-side tables can come out interleaved: a line from the left column followed by a line from the right. This is a layout problem, not a bug in extraction. If the document is a table, PDF to Excel structures it better; if it is a multi-column article, expect to do light cleanup.
What extracted text is good for
- Pasting quotes and passages into documents or notes.
- Feeding content into translation or summarisation tools.
- Searching across a large set of documents.
- Reformatting the content of a PDF whose layout you dislike.
Text extraction vs other export formats
Plain text extraction gives you the words with minimal formatting. Word conversion keeps headings and styling so the result reads like a document. Excel conversion reorganises tabular content into cells. EPUB conversion produces a reflowable ebook. The same PDF can feed all of them; choose the one whose output matches what you will do next.
- Need the words for analysis or pasting? Extract plain text.
- Need an editable document that keeps structure? Convert to Word.
- Need the data in a grid? Convert to Excel.
- Need a version for an e-reader? Convert to EPUB.
Encrypted and restricted PDFs
A PDF that is encrypted with an open password must be unlocked before its text can be read. A file that restricts text extraction by permission will refuse extraction even if it opens fine — that is the security model working as intended, not a fault in the tool. Unlock the file with the correct password first, then extract.
Large documents and performance
Extraction reads every page in the file, so a very large PDF takes longer in proportion to its page count. If you only need part of the document, use the page range option to extract just those pages — the tool then only reads what you asked for, which is faster and produces a cleaner result.
Extraction happens entirely in your browser, so the document never leaves your device. That means there is no upload time to wait for — the only cost is the local processing, which is typically a fraction of a second per page.
Privacy
Extraction is local: the PDF is read in your browser and the text is produced on your device. Nothing is uploaded, so the contents of confidential documents stay on your machine.