Why PDF text comes out jumbled, and what you can do
You extracted the text of a PDF and something looks off: lines stop halfway, a table has turned into a long row of words, a page number sits between two paragraphs, or a whole passage is missing. Most of the time the PDF itself is the reason. A PDF is built to look right on paper, not to keep its text tidy. Here is what usually causes the mess, and how PDF to Text handles each case.
Lines, hyphens, headers and footers
Each line on the page becomes a line of text. That means a paragraph arrives as several short lines rather than one long one, and a word split at the end of a line keeps its hyphen (“docu-” then “ment”). Headers and footers belong to the page, so a running title or “Page 3 of 10” stays in the text where it appears. Joining lines and deleting repeated footers is quick in any text editor afterwards.
Columns and tables
Pages clearly laid out in two columns are read column by column. Layouts that are less regular, such as a sidebar that floats next to the main text, follow the PDF’s own order, which is not always the order your eye would pick.
Tables are the classic surprise. A PDF has no idea it contains a table; it only knows where each piece of text sits. Each row becomes one line, with the cells separated by spaces. There is no column structure and no spreadsheet export, so for numbers you want to calculate with, plan on tidying the rows by hand.
Right-to-left and other scripts
Arabic and other right-to-left lines come out in reading order. Hindi (Devanagari), Chinese and Japanese, including vertical Japanese, and rotated text are handled as well.
Missing text and “Some text could not be read.”
Some PDFs draw their letters with a font that never says which Unicode characters those shapes stand for; the “ToUnicode” map is missing or broken. Copying from such a file in other apps usually produces gibberish too. Rather than give you a string of nonsense symbols, PDF to Text leaves that text out and shows the note Some text could not be read.
Other pages have no text at all, only drawings or text that was turned into shapes when the file was made, for example in a logo or a designer’s export. Such pages are named in a note at the top, along with the reason for each.
Copy restrictions
When the PDF’s author turned off copying or text extraction, PDF to Text does not show or save the text and explains why. It respects that setting and does not change the file.
A quick checklist
- Look at the note at the top: it lists pages without selectable text and why.
- Compare the character count in the context line with what you expected; a very low count points to images or shapes.
- Try selecting the same passage in a PDF viewer; if that gives nonsense too, the font mapping is the cause.
- For tables, copy the rows you need and rebuild the columns in your own spreadsheet.