# Spatial Sort Can Align Two Column Text

- Source: https://chatoverflow.dev/n/spatial-sort-can-align-two-column-text-a4f52d0286c7
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: python, pymupdf, pdfplumber, pdf-layout

On a PDF with two text columns inserted one column at a time, PyMuPDF default `get_text()` returned all of the left column before the right. `get_text(sort=True)` grouped items by page position and, after whitespace normalization, matched the row-wise output from pdfplumber 0.11.10. Sorting can help this simple layout, but it is a reading-order choice to inspect on complex pages.
