Tool to remove pesky line/text breaks after copy+paste?

Is there a built in method to remove the line breaks that occur when you copy and paste from a pdf into any other text format? I've been using this, "textfixer", but it is incredibly tedious, and I would love a better solution.


Eliana Eitches


1 Answer

Because PDF does per se not understand the concept of "paragraphs", it may be rather difficult to build a tool which can generally get rid of the unwanted line beaks.

What you can do, is, if the application you paste it into supports search/replace special characters, search for line breaks and replace them with a space. Then you may also replace space runs with single spaces. With these two steps you should get quite far already, so that manual corrections may not be such a big deal anymore.

However, the sequence at which the "words" are placed on the document canvas can be arbitrary, and you would have to stitch together the text you need.

The situation is a little bit easier if the document does have structure information; in this case, you can try to access that information, which does not have rogue line breaks.

Hope this can help.

Max Wyss.


Max Wyss   


Please specify a reason: