PDF to Text
Copy all the text out of a PDF in reading order, or save it as a .txt file — scanned pages read with OCR — without uploading it.
Drop a PDF here, or
Your files never leave your device
Processed in this browser · one at a time
Takes all the text out of a PDF so you can copy it, search it or paste it elsewhere, in the order you would read it: a page in two columns gives one column and then the other, not a mix of both line by line. Pages that are scans, with no text to copy, are read with OCR when you ask, and the result is a plain text file. It runs on your device; the PDF is never uploaded.
How to use it
Add a PDF; one with a password asks for it. Its text appears as soon as it opens, ready to copy or download as a .txt file.
- Pages: such as
1-3, 5; empty for every page. - Page markers (on): a line such as
— Page 3 —before each page's text. - Join words broken at line ends (on): a word split by a hyphen at the end of a line is joined again, when the next line goes on in lower case.
- Leave out headers and footers (off): lines at the top or bottom of the page that repeat on most pages, such as a running title or a page number, are left out. Numbers count as the same, so “Page 3 of 10” and “Page 4 of 10” match. It needs three pages or more.
When pages have no text of their own, the tool says how many and offers to read them. Choose the language they are in (up to 3, from 15, Hindi and nine other Indian languages among them) and read them; the text reader downloads the first time, about 11.97 MB for English.
How it works
A PDF keeps its text as runs of characters, each placed on the page, in whatever order the program that wrote it chose. The tool puts runs that share a baseline into lines, and looks for strips of white space that run the height of a part of the page: those part columns, which are read left to right (right to left for Urdu and Arabic), and the parts between wide gaps are read top to bottom. Columns only a few words wide are taken as a table's, whose rows read across. Within a column, a wider gap, an indent or a change of size starts a new paragraph. Ligatures such as fi come out as the letters they join. Filled-in form fields follow their page's text, a line each.
A page is read with OCR when it has no text of its own, when it is a scan with only a little text over it, or when its text is garbled, as text in old Hindi fonts such as Kruti Dev is. It is drawn at 300 DPI, turned upright if it is sideways, and read by Tesseract, the open-source OCR engine.
Examples
Words broken at line ends
- In the PDF
Most competitive neural sequence trans- duction models have an encoder- decoder structure.
- Copied
Most competitive neural sequence transduction models have an encoderdecoder structure.
Each line after a hyphen starts in lower case, so each hyphen is taken as a break and the rest of the word moves up. That joins “transduction” correctly, but also “encoder-decoder”, a word written with a hyphen, into one: the text cannot tell the two apart. Turn the option off to keep every hyphen.
Frequently asked questions
See also
- Searchable PDF (OCR) — to make a scanned PDF searchable.
- Image to Text — to copy the text out of a photo or screenshot.
- Compare PDF — to find what changed between two versions of a PDF.