# Why does text copied from a PDF have line breaks everywhere?

Source: https://convcc.com/answers/why-pdf-text-has-line-breaks/ (updated 2026-11-17)

Because a PDF stores lines at fixed positions, not paragraphs: the line breaks you see are where the line ended on the page. Getting paragraphs back means joining lines by their geometry (gaps, indents, hyphens at line ends) and reading columns one at a time.

## Three things that go wrong

- Every line ends with a hard break, so the text doesn't reflow.
- Words hyphenated at a line end stay split: «docu- ment».
- Two columns are read across, alternating half-lines from each.

## How paragraphs are rebuilt

- A new paragraph starts only on a vertical gap, an indent, a change of size or weight, or a line that ends early.
- A hyphen at the end of a line followed by a lowercase word is joined.
- Columns are found by the empty gutter between them and read one after another.
- Running headers and page numbers that repeat on every page are left out.
