[pdftex] Blank lines are ignored when copying-and-pasting from PDF

James Quirk jjq at galcit.caltech.edu
Sun Jan 3 00:38:38 CET 2010


On Sat, 2 Jan 2010, martijn.list wrote:

> Hi Reinhard,
> Interesting workaround (attaching the key). The only problem I have with PDF
> attachments is that I want the PDF to work with all PDF readers. The PDF is an
> installation manual for my open source project and I want it to work even when
> the PDF reader does not support attachments.
> I tried to insert spaces etc. but it seems that all spaces are removed. I have
> search the web quite intensively for a solution but haven't found one. You
> would think that this is problematic for others as well, for example when
> including source code snippets. I have tried the listings package (which is
> used for including source code) but it suffered from the same problem.
Another approach would be to use PDF's /ActualTex facility.
For example, process this LaTeX and then try copy and pasting
the text 'PGP-SIG'

%--------- start example --------------
\pdfliteral direct {%
(-----BEGIN PGP PUBLIC KEY BLOCK-----\string\r
Version: GnuPG v1.4.9 (GNU/Linux)\string\r
-----END PGP PUBLIC KEY BLOCK-----\string\r
 \pdfliteral direct {EMC}
%------------ end example ---------------

The resultant PDF only works with Adobe Reader and so is
probably not want you want, but I thought I'd pass it across
for completness.

> Kind regards,
> Martijn Brinkers

More information about the pdftex mailing list