[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


Martin,

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 --------------
\pdfminorversion=5
\documentclass{article}
\begin{document}
\pdfliteral direct {%
 /Span
    <</ActualText
(-----BEGIN PGP PUBLIC KEY BLOCK-----\string\r
Version: GnuPG v1.4.9 (GNU/Linux)\string\r
\string\r
mQGiBElPrxcRBADTrz89p8FEAC/DEpNmbanNruED96RAuE0FRgbERqvgeSB7SVeW\string\r
[snip]\string\r
TrzgYl9YhiNdY7s=\string\r
=4Rpa\string\r
-----END PGP PUBLIC KEY BLOCK-----\string\r
)>>
  BDC
 }%
 PGP-SIG
 \pdfliteral direct {EMC}
\end{document}
%------------ 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.

James
> 
> 
> Kind regards,
> 
> Martijn Brinkers
> 
> 


More information about the pdftex mailing list