Recorded evidence, not a new run. The corpus outputs and status strings below were recorded on 17 September 2026 with PDF.js 3.11.174. The current file-picker and drop workflow also shows page previews, page selection and a warning for pages without a text layer. It does not run OCR. Historical output is retained verbatim; it is not a promise of the current result for your file.
The test that answers the question
The corpus contains 14a-row-major.pdf and 14b-column-major.pdf. They have the same page size, font, coordinates and column strings. They are visually indistinguishable when opened side by side. The difference is the order in which their text operators appear in the PDF content stream.
The recorded converter produced these body lines:
| Input | Observed Markdown line |
14a-row-major.pdf | Left column, line one. Right column, line one. |
14b-column-major.pdf | Left column, line one.Right column, line one. |
The second line has no space between one. and Right. It reads like a typo, which makes it more dangerous than an obvious error: a reader can miss that two columns have been fused together.
Why the converter sees a difference
A PDF is not a document model in the way a Markdown file is. It is a set of drawing instructions. Text can be placed at coordinates that make it look like a normal reading order, while the content stream records those text runs in another order.
In this pair, PDF.js emits the spacing between two consecutive text runs as its own synthetic text item in one case and omits it in the other. The page looks the same, but the extracted items are not the same sequence. The converter has to reconstruct reading order from those items; it cannot recover information that the file does not express consistently.
That is why “the PDF looks fine” is not a sufficient test. A visual inspection checks the rendered page. A conversion check checks the text items and the spacing decisions made while rebuilding a reading order.
Two-Column PDF to Markdown: Why the Output Comes Out Scrambled
Last updated: 17 September 2026
The short answer: in the recorded column fixtures, the converter joined text sharing a baseline instead of recovering a column-by-column reading order. Both the PDF text items and this converter's grouping logic contributed to the result. The outputs below describe those named inputs, not every PDF or converter.
There is also a second, nastier version of the same failure: sometimes the two columns are joined together with no space between them at all, so the output reads line three.Right column, line one. That one is harder to spot, and it depends on something inside the PDF that you cannot see by looking at the page. It is explained below.
The raw output examples in this section were recorded from the converter on this site, run on 17 September 2026 against the named fixtures. The historical raw outputs are quoted verbatim; explanations also refer to the current code where stated.
What actually happens
Take a page with two columns of four lines each, where the left and right columns sit on the same four baselines — a shared-baseline layout represented by the named fixture.
Every word is present and every word is in the wrong place. The correct reading order is the whole left column, then the whole right column. What came out alternates.
The cause is in how text is grouped. The converter walks the text items on the page and puts them into the same line whenever their vertical position is within 3 points of each other, then sorts those items left to right and joins them. Two columns that share a baseline are, by those rules, one line. Nothing in the coordinates says "these two runs are separate columns" — the geometry genuinely looks identical to a wide single line.
The version that is much harder to catch
Here is the same layout with one difference: the columns are slightly offset vertically, so the right column starts lower than the left and they only overlap for three lines. This is what you get in real documents whenever a section heading, a figure or a pull quote pushes one column down.
Look closely at line three: Left column, line three.Right column, line one. There is no space between the two runs. The sentence has been welded shut.
This matters more than it looks. Interleaved text with spaces is at least obviously wrong when you read it — two sentences sitting side by side is a pattern a human notices. Text welded together with no separator is the kind of thing that survives a skim, gets pasted into a document, and then fails a search or an automated check much later.
Why the space is sometimes there and sometimes not
This part is not obvious, and it is the reason the same-looking page can produce two different kinds of broken output.
I built two PDFs with identical geometry: the same four baselines, the same x positions, the same font, the same text. The only thing that differs is the order in which the text was written into the PDF's content stream — one written row by row (left line one, right line one, left line two, right line two), the other written column by column (all four left lines, then all four right lines).
Dumping the text items shows exactly what the difference is. In the row-by-row file, the extractor emits an explicit space item between the two columns:
'Left column, line one.' x=50 y=700
' ' x=164 y=700
'Right column, line one.' x=320 y=700
In the column-by-column file, that space item is simply not there:
'Left column, line one.' x=50 y=700
'Right column, line one.' x=320 y=700
The consequence in the Markdown:
Row-by-row file:
Left column, line one. Right column, line one.
Column-by-column file:
Left column, line one.Right column, line one.
The two source files look the same. In this recorded conversion, their text-operator order affected whether a space survived. That result depends on both the PDF and the extraction logic; it does not establish how another converter will behave.
Three columns are worse
A three-column layout — the standard for journal papers and many product brochures — merges all three columns into a single line per baseline.
# Three Column Layout
Alpha one. Beta one. Gamma one.
Alpha two. Beta two. Gamma two.
Alpha three. Beta three. Gamma three.
The reading order is now wrong in two directions at once, and there are three times as many join points where a missing space can weld two sentences together.
A mixed page, which is the real worst case
Most documents people actually need converted are not purely one layout. A page with a heading, a two-column paragraph and a table underneath produces this:
# Mixed Layout Page
Left paragraph, line one. Right paragraph, line one.
Left paragraph, line two. Right paragraph, line two.
### Summary Table
Region Revenue Growth
North 1,200 8%
South 980 -2%
East 1,540 12%
Closing paragraph under the table.
Three separate things went wrong on one page: the two-column paragraph is interleaved, the table has lost its column structure so you can no longer tell which number belongs to which heading, and the closing paragraph has been pulled up against the last table row. The heading levels are also inconsistent — the page title is an H1, the table title is an H3, and nothing in the source document explains why.
Inspect the source before converting
Open the PDF, select a sentence in the left column and inspect what the reader selects. Treat this as a source check, then compare the actual Markdown: reader selection does not establish this converter's output order.
| What the selection does | What it means |
| The selection stays inside the left column and stops at the column edge | The reader selected one column; check the converted Markdown separately for interleaving and spaces. |
| The selection jumps across to the right column on the same visual line | The reader selected across columns. Inspect the extracted order; selection alone does not predict spacing in this converter. |
| You can select an entire column top to bottom as one block | The reader can select one column, but this does not prove that this converter will preserve its reading order. |
| Nothing selects, or the whole page selects at once | Check for a usable text layer and review the scanned-page limits; selection behaviour alone is not proof. |
A PDF reader's selection is a useful inspection aid, not a test of this converter. Tagged PDFs may contain logical structure, but the current Markdown writer groups text items by position and does not read that structure tree.
What to do about it
There is no trick that makes a simple text extractor reorder columns. It is a layout analysis problem, and a converter that does not do layout analysis cannot solve it by trying harder. So the realistic options are:
- Repair against the source. In the shown outputs, one line can contain both a left-column and a right-column passage. Alternating odd and even lines will not separate them. Use the original page to identify the boundary before rebuilding each column.
- Convert one column at a time. Crop the PDF into single-column strips — most PDF readers can export a page region — and convert each strip separately. This gives correct reading order and is the most reliable manual approach. It is worth doing for a document you will reuse.
- Use a layout-aware workflow when needed. Check its output and file-handling policy directly. Layout analysis is not an implemented step in this homepage tool; it is not inherently limited to server-side processing.
- Select and paste. For a single page, selecting the text in your PDF reader and pasting it into an editor often gives you the correct reading order, because the reader knows about columns. It is unglamorous and it is frequently the most accurate option for one page.
If the output is going into a search index or a language model
Interleaved text is not just ugly, it is actively harmful. A retrieval system splits your document into chunks and matches questions against those chunks. A chunk built from interleaved columns contains two unrelated statements spliced together, and it will be retrieved for questions about either of them while answering neither. The model then writes a confident answer from corrupted source text, and nothing in the pipeline flags it.
If you are converting documents for that purpose, the column check is not optional and it is not something you can do after the fact. Check the output before it goes in.
Test 2: two columns — this is where it falls apart
The same amount of text, laid out in two columns, with the left and right columns sitting on the same horizontal lines. This fixture tests shared baselines; it does not represent every multi-column document.
## Two Column Layout
Left column, line one. Right column, line one.
Left column, line two. Right column, line two.
Left column, line three. Right column, line three.
Left column, line four. Right column, line four.
Every word is present and every word is in the wrong place. The correct reading order is the entire left column, then the entire right column. What came out interleaves them, producing sentences that look plausible and are nonsense.
This is the most dangerous failure mode in the whole subject, precisely because it is quiet. There is no error message, no missing text, and nothing that looks broken. If you skim the output you will believe it worked. If you feed it into a search index, a knowledge base or a language model, you are feeding it corrupted content and you will not find out until something downstream gives a strange answer.
In this implementation, grouping text by vertical position joins columns that share a baseline. Recovering the intended order would require additional layout logic. The recorded result does not rule out implementation bugs or establish a limit of every PDF converter.
This failure has a second form that is harder to catch, where the columns are joined with no space at all between them, and it depends on something inside the PDF that you cannot see by looking at the page. Reading order evidence on this page shows both forms and how to tell which one you have.