PasteCleanly / Guides

Clean up text copied from a PDF

A PDF can look right on the page but paste as dozens of short lines. Here is how to rejoin the prose without flattening the parts that should stay separate.

In this guide

Identify what changed in the paste

Copy one paragraph into the editor and compare it against the PDF on screen. The page may look neatly typeset, but the clipboard can hold a line break after every visible line. If the end of a line runs straight into the next line on the page, the break probably belongs to the layout rather than the sentence. If a blank row separates two topics, keep that separation. Look at the words on either side of each break, not just at the shape of the pasted block.

There are three different problems that are easy to confuse. A hard wrap interrupts a sentence in the right reading order. A bad selection interleaves columns or adds headers and footers. A scan may not expose selectable text. A line break tool is designed for the first problem. It can make the second look smoother without making it correct. Keep an untouched sample nearby to compare with the result, particularly when the page includes notes, bulleted instructions, or words that end with hyphens.

Open Remove Line Breaks to check a sample

Select the right amount of text

For a single-column page, begin with a paragraph or a continuous section between headings. Try to exclude running headers, page numbers, and footnote text. If a section continues on the next page, copy the part from each page separately first. A repeated header between the halves can become part of a sentence if you join everything at once. Compare the first and last sentence of each selection against the PDF before pasting the next chunk.

On a multi-column page, copy one column at a time. If the first half of one sentence is followed by a fragment from the neighbouring column, the line order is already wrong. Start over with a narrower selection rather than applying a transformation. If a selection includes a list of invoice items or steps, decide whether each row must stay separate. The editor recognizes common list markers, but a list made only of indentation or typographic spacing may not be detected.

Repair a wrapped paragraph without flattening it

Paste the sample into Original and leave Repair wrapped text selected. The editor builds a preview without replacing your paste. It treats likely continuations as part of the same paragraph and keeps blank lines. Recognizable lists and fenced code are treated conservatively. Read the preview at each join to check that the words still belong together.

Send the revised schedule to the
front desk before noon.

A copy will be posted downstairs.

The first two lines should become one sentence. The final sentence should remain a separate paragraph. If all three lines become one block, check that you are in repair mode rather than separator mode, and look for the original paragraph break in the left pane. Some PDFs separate paragraphs visually without putting a blank row on the clipboard. If a real boundary is missing, add it to the original pane before repairing. That is safer than editing the joined output and losing track of which parts came from the source.

Try Repair wrapped text

Decide what to do with each hyphen

Take a close look at every hyphen at the end of a pasted line. It can be inserted to split a long word at the margin. In confir- followed by mation, removing the mark produces confirmation. In well- followed by known, the mark may be part of the intended compound. A visual cue alone cannot tell you which is which. A surname or technical term can be even harder to judge from one line.

Repair mode keeps a recognized line-end hyphen until you make a choice. Choose Review hyphens beside the preview and select only the marks you want removed. Compare the result against the source sentence. If a name or code is unfamiliar, keep the mark until you can verify it. A soft hyphen is a separate character that can be hidden when text is not wrapped. If a word looks correct but fails a search after repair, use the invisible character inspector before removing ordinary hyphens across the text.

Distinguish paragraph repair from joining a list

Use Join lines with a separator when your goal is a different output format, not when you want to reconstruct prose. Three labels copied one per line might need to become a comma-separated line. Choose comma and space, a pipe, a tab, or a custom separator. With paragraph breaks off, the result is one continuous line. Paste a small list first to make sure the destination expects exactly that separator.

Separator mode trims the ends of nonempty lines and does not try to keep prose, lists, or code structure intact. With Keep paragraph breaks on, blank rows divide groups and each group is joined separately. That is useful if each group belongs to a different category. If a value contains a comma that must stay inside a quoted field, use a format that understands quoting. Joining rows with a comma is a text operation. Open the CSV and TSV converter for a table, or format a single list for one record.

Open the line joiner and choose a separator

Handle headers, footers and page numbers deliberately

Before joining a long selection, look for fragments that repeat on every page: a project name, a date, a confidentiality label, or a line containing only the page number. If these lines are not part of the material you need, remove them from the source pane before repairing. If a sentence was interrupted by a page break, reread it after the unwanted line is gone. Check that punctuation around the join still makes sense.

When unwanted lines share an exact prefix or suffix, Filter lines can keep or remove entire rows. A footer starting with a stable label can be removed using Starts with. Preview what is kept before you pass the result on. A search term that also occurs in real prose can remove a legitimate line. Repeated lines are not always mistakes: two identical inventory entries may represent two different items. Remove duplicates only when repeats are redundant in your output.

Do a separate pass for spacing

A document exported from a layout program can add large gaps inside a line, trailing spaces at the right margin, or tabs used as visual separators. First repair the wrapping. When the prose reads correctly, use Use result as input and switch to Clean whitespace. Separating the two steps makes it easier to see which change caused a problem.

Start by trimming the ends of lines. If you still see gaps between words, choose to collapse repeated spaces. Leave that option off for fixed-width tables, code, or text that uses spaces to align columns. A block can be readable as prose but unusable as data if its alignment was lost. If normal-looking spaces still affect a lookup, inspect the underlying characters. A regular space, a nonbreaking space, and a thin space do not always behave the same. Some spaces are intentional, such as the one keeping a measurement next to its unit.

Preserve headings, addresses and structured blocks

Headings, addresses, poems and captions can rely on meaningful single line breaks. If you see a block whose arrangement carries information, set it aside and process it separately. A street address normally keeps its recipient, street and city on distinct lines. Treating it as ordinary prose can make the result harder to paste into a form. With a long reference list, check that each entry still starts where it should.

Repair mode recognizes some signals for structure, but the clipboard may discard them. A bullet can arrive with no marker, and a table can lose the spaces that made its columns clear. Compare the shape of the preview against the PDF, not merely the words. When a block has no reliable cues, start with Plain text and keep the layout as copied. Sometimes the right output is a mixture: repaired prose plus untouched addresses or quotations. Assemble those verified pieces in the destination instead of applying one rule to several structures.

Recognize when the PDF needs OCR or re-exporting

If highlighting a paragraph selects the whole page like a picture, the PDF may be a scan rather than selectable text. This tool does not read images. Use an OCR workflow to obtain a text layer first, then verify the OCR output against the visible page. Common problems include confusing zero with the letter O, dropping accents, or reading columns out of order. A clean preview does not validate any number in the source.

If you can select the text but see symbols where letters should be, try a different small selection or export from the original document. Broken encoding and broken wrapping are separate issues. Fix broken accents previews certain UTF-8 mistakes, but cannot infer text that was replaced or never extracted correctly. If you have access to the original spreadsheet or form data, use it instead of copying the rendered PDF. It can preserve row and column boundaries that were lost at the layout stage.

Verify a larger selection before you copy it

Before processing several pages, test a section that includes an ordinary paragraph, a blank line, a hyphenated word, and a structured element. Check the first and last words around each join. If the small test behaves as expected, expand your selection while continuing to check page boundaries and unusual punctuation. For numeric data, spot-check complete records rather than scanning only the headings.

For text going into a report, paste the result into a draft first. Keep the original selection so you can compare it later. Compare versions shows changed lines. Because rewrapping changes line boundaries, the comparison can mark an entire paragraph even when the words are unchanged. If you need a plain text form value, verify that the destination did not add its own formatting or remove meaningful breaks. The editor does not save a draft on refresh. Copy the verified result or download it before you close the page.

Open Remove Line Breaks for the final pass

Check repeated workflows against an example

Suppose you need to copy the contact section from each of several two-page notices. Make one test from a notice with a long heading, a paragraph continuing onto another page, and a postal address at the end. Repair the prose in one pass and copy the address separately. Check whether there is a page label between the halves of the continuing paragraph. A repeatable workflow is a sequence of decisions, not a single setting applied blindly to each file.

If your destination is a help article, test a pasted paragraph and the address in the actual editor used to publish it. Some editors use a single Enter as a paragraph and others display pasted blank rows differently. Confirm that the finished copy is readable there. If you are producing a list for a script or spreadsheet, verify the exact separator and preserve a sample of the expected output. Use that sample as a check on later batches.

Use a final checklist for the copy

The reading order should match the PDF. Blank rows should remain where they represent paragraphs. Addresses, quotations, and list items should still look like separate units if their layout matters. Headers or page numbers should not appear inside repaired sentences. Review ambiguous hyphens individually. Where accuracy matters, save a short original excerpt alongside the cleaned version so a later reader can verify the changes.

Check what the destination expects. For a paragraph, use repair mode and preserve meaningful spacing. For a list that must become one line, select the intended separator and decide what to do with blank groups. For a table, prefer the original structured export. If a search still fails, inspect hidden characters before making another broad edit. Finally, check at least one full passage against the source. This workflow can repair the text you provide, but cannot supply passages that were never copied or decide which editorial changes are acceptable.

Return to the PDF text repair utility

After pasting into the destination, check the first heading and the final paragraph against the PDF. The copied selection can end halfway through a line even when the cleanup itself worked. Confirm that no continuation is missing on the next page.