Why are lines from the two columns of my newsletter PDF mixed together after extracting the text?
Because lines are rebuilt by their height on the page: text fragments at about the same vertical position become one line, ordered left to right. So a line from the left column and a line from the right column at the same height get joined. For two column layouts, expect to separate them by hand; single column documents come back in clean reading order.
What a PDF actually stores
A PDF has no idea what a column or a paragraph is. It stores pieces of text, each with a position on the page: how far from the left and how far from the bottom. The order of those pieces inside the file depends on the program that made it, and often has nothing to do with reading order. So the tool rebuilds lines from the positions, not from the storage order.
A worked two column example
Here is what the tool's line rule produces for a newsletter with a left column about returns and a right column about delivery, where each left line sits level with a right line:
Left column: Returns accepted within, and under it 14 days of delivery.
Right column: Delivery takes 3 to 5, and under it working days in Riyadh.
First extracted line: Returns accepted within Delivery takes 3 to 5
Second extracted line: 14 days of delivery. working days in Riyadh.
Each extracted line is correct by position, yet it mixes two sentences. Notice that the gutter between the columns becomes a single space, so nothing clearly marks where one ends and the other begins.
Dealing with the mixed text
- In the PDF text extractor, extract only the two column pages using the Pages field, so you do not untangle the whole newsletter if the other pages are single column.
- Choose Page by page so you know where each page starts.
- Paste the text into an editor, split each line where the left column ends, and move the right halves down.
- If both columns have the same number of lines, this goes quickly, since every extracted line is half from each side.
If you have two versions of the newsletter in the same layout and want to know what changed, you do not need to separate the columns at all: extract both with the same settings and compare them in Text comparison. The mixing repeats identically in both, and only the real change stands out.
Documents that come out clean, and ones that do not
- Single column contracts, letters and invoices: reading order with paragraph breaks.
- Newsletters and magazines with two or three columns: level lines merge.
- Side notes and margin comments: they join the line beside them.
- Tables: each row becomes one line with spaces between the cells.
Common questions
Does this happen with Arabic text too?
Yes, and the order within a line is always left to right, so the left column can come first even in an Arabic document.
Why doesn't the tool detect columns automatically?
Guessing can wrongly cut tables and wide lines without you noticing. The current rule is simple and behaves the same every time, so you know what to expect.
What if the two columns have different line heights?
If lines are not level, each may come out on its own, but they are ordered by height, so lines from the two columns alternate.
