How to instantly remove unwanted line breaks when copying from a PDF
Web Editors' Community
,
21 Jun 2011
Sometimes you need to copy text from a PDF document into the website. If you just grab the text and paste it straight in, you will often get these sorts of effects, where the lines don't reach the right-hand edge of the page:

Here is a useful trick to quickly resolve this without having to remove all the line breaks manually. Basically all it does is automatically replace all the unwanted line breaks with a single space, making all the text run together into a single paragraph:
All the line breaks have now been removed.
Now, copy the text from the Word doc and paste into the website – but please remember to remove the Word formatting, either by using the Notepad process (copy from Word, paste into Notepad, copy from Notepad, paste into website) or by pasting direct from Word into the website but applying the “format eraser” to the text afterwards.
The only problem with the above technique is that you may have a large chunk of text, spread across several paragraphs, that you want to paste from the PDF into the website - because if you remove all the line breaks, all your paragraphing will go as well. So how do you retain the paragraphs but remove all the unwanted line breaks? Here's how:
Now, all instances of your ` (or other chosen symbol) will have been replaced with two line breaks, reproducing your paragraphs.
Web Editors' Community
,
21 Jun 2011
Sometimes you need to copy text from a PDF document into the website. If you just grab the text and paste it straight in, you will often get these sorts of effects, where the lines don't reach the right-hand edge of the page:

Here is a useful trick to quickly resolve this without having to remove all the line breaks manually. Basically all it does is automatically replace all the unwanted line breaks with a single space, making all the text run together into a single paragraph:
- copy the text you want from the PDF
- paste into a new Word document
- click “edit” then “replace”
- make sure you’re in the “find what” field
- click “more” then “special”
- select “paragraph mark” (top of the list)
- click into the “replace with” field
- press the space bar once
- click “replace all”
- click “ok” then close the “find & replace” box.
All the line breaks have now been removed.
Now, copy the text from the Word doc and paste into the website – but please remember to remove the Word formatting, either by using the Notepad process (copy from Word, paste into Notepad, copy from Notepad, paste into website) or by pasting direct from Word into the website but applying the “format eraser” to the text afterwards.
The only problem with the above technique is that you may have a large chunk of text, spread across several paragraphs, that you want to paste from the PDF into the website - because if you remove all the line breaks, all your paragraphing will go as well. So how do you retain the paragraphs but remove all the unwanted line breaks? Here's how:
- copy the text off the PDF
- paste into a new Word document
- go through the text, manually inserting a ` symbol (top left of standard keyboards) at the beginning of each paragraph. (NB this can be any symbol you like, e.g. @ ~ $ etc - but it must be one that isn't used legitimately within the text)
- click “edit” then “replace”
- make sure you’re in the “find what” field
- click “more” then “special”
- select “paragraph mark” (top of the list)
- click into the “replace with” field
- press the space bar once
- click “replace all”
- click “edit” then “replace”
- make sure you’re in the “find what” field
- type a ` character (or whatever symbol you chose to denote the start of a paragraph in step 3)
- click into "replace with" field
- click "special" (if this isn't showing, click the "more" button first)
- click "paragraph mark" TWICE
- click "replace all"
Now, all instances of your ` (or other chosen symbol) will have been replaced with two line breaks, reproducing your paragraphs.