Repair PDF line breaks
Rejoins hard line breaks inside paragraphs to restore the original paragraphs.
Example
- Options used
- Default options
Input
Plain text copied from a PDF keeps every visual line break, so sentences are cut in the middle and long words are hy- phenated at the end of a line. A blank line still marks a new para- graph, which is kept as it is.
Output
Plain text copied from a PDF keeps every visual line break, so sentences are cut in the middle and long words are hyphenated at the end of a line. A blank line still marks a new paragraph, which is kept as it is.
Symbols in examples: ⇥ tab · · trailing space · ⍽ NBSP · □ full-width space · ◌ zero-width character
Open this operation in the toolWhat it does
PDF is a format that places characters at coordinates on a page, so it has only a weak notion of paragraphs. As a result, when you copy text, a line break is inserted at the end of every visible line and sentences are cut in the middle. This operation joins those lines back together to restore the paragraphs.
Processing rules
- Blank lines are treated as paragraph boundaries and kept.
- Lines within the same paragraph are joined. Latin and Korean text is joined with a single space, while characters written without spaces, such as Chinese characters and Japanese kana, are joined directly with no space.
- Lines starting with a bullet or number such as
-,•or1.stay on their own line.
Options
- Rejoin words hyphenated at line ends: merges words split with a hyphen at the end of a line in English typesetting, such as
infor-/mation, intoinformation. It only merges when the next line starts with a lowercase letter, so spellings likewell-Knownare preserved. - Treat short lines ending in punctuation as paragraph ends: in PDFs where paragraphs follow each other without blank lines, a line that ends with a period or similar mark and is clearly shorter than the longest line in that paragraph is treated as the last line of the paragraph, and its line break is kept.
Limitations
For two-column papers, the copy order itself may be scrambled, which this operation cannot fix. If headers or page numbers are wedged into the body text, remove them first with Filter lines. The full workflow is covered in the PDF line break guide.