[Tex/LaTex] Copy from PDF without line breaks at end of each line

copy/pasteline-breakingpdf

When I produce the PDF, open it and copy the paragraph into notepad, there is a forced line break at the end of every line in the PDF. Is there a way to get over this, so that I can copy the paragraph as continuous text?

(Of course, I can just copy the paragraph from my .tex file. But the point is that I want other people to be able to copy text from my pdf.)

My MWE:

\documentclass[11pt,a4paper]{article}
\usepackage[cp1250]{inputenc}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}

Best Answer

Copy the text in another text editor capable of removing line breaks. The editor I'm actually referring to is Sublime Text. You just have to follow these steps:

  1. Install Sublime Text;
  2. Install Package Control (this is not necessary but is almost a sine qua non);
  3. Search for Paste PDF Text Block with Package Control and install it, or install it manually if you did not install Package Control.
  4. Ctrl+alt+v the text you want to copy from a pdf file into a new file in Sublime Text.

You will not see any line breaks.