Stitch text copied from a PDF
Remove the line breaks that fall mid-sentence. Paste the text you copied from a PDF, a slide or a handout: broken lines are stitched back, words cut by a hyphen are rejoined and the lines that repeat on every page disappear. Whatever it is unsure about, it tells you, instead of doing it behind your back.
Why a PDF comes out in steps
In a PDF the text has no paragraphs: it has lines drawn at a certain position. When you copy it, every line brings its own break along, and what you paste is broken where the line ended on the page, not where the sentence ends. In between you are left with the running headers, the footers and the «Page 12 of 40» that sat in the margins.
How it works out where a paragraph ends
Not from the full stop: a contract or a call for tenders is full of abbreviations, and «see fig.» at the end of a line closes nothing at all. The real signal is the column width, measured on your own text: a line that reaches the margin is carrying on, a short line is closing. The most common abbreviations are kept in a separate list, so they do not mislead it.
It only does what it is sure about
The safe joins it makes on its own. The doubtful ones it does not make, and lists them for you: there are few, and you can look at them in a minute. It is the opposite of applying everything and handing you nine hundred changes to check, which nobody really checks. The original text stays one click away for comparison.
The hyphen, the only one that goes wrong inside a word
A badly joined line is obvious at a glance; a badly rejoined word is not: «socioeconomic» in place of «socio-economic» slips past on a reread. That is why the hyphen is decided by the document itself: if that pair appears joined somewhere else, it is rejoined; if it appears with the hyphen, the hyphen stays; if it appears neither way, it is left alone and ends up in the list worth a look.
What it cannot do
A two-column PDF arrives in your clipboard already interleaved, a line from the left and one from the right alternating: no stitching straightens that out, and it has to be sorted first. Poems, addresses, menus and code have their line breaks on purpose: for those there is the «leave short lines alone» switch. And if you still have to get the text out of the file, go through Extract text from PDF first.