[pdftex] Links & \pdfannot problems (newlines & width)

Jörg Ebeling joerg.ebeling at shbe.net
Sat Sep 27 02:32:09 CEST 2008


Dear all

I need the possibility to put external links (HTTP URLs) into my LaTeX 
document, but mainly for copying them to the clipboard instead of 
clicking them.
For this \href or \url appeared to be best for me, but then I recognized 
that some Reader version like the well common 8.1.x ones, doesn't have 
the functionality to "right-click" and "copy to clipboard" linkx, or any 
other possibility to copy the link instead of simply clicking them.

So I looked for another solution than simply writing the URLs as plain 
text to the document (because I won't get them printed !) and recognized 
the very nice PDF- Text- Annotations.
Annotations don't get printed (with the main document) and can be used 
for Ctrl-C acrobatics, but the beginning happiness followed hours of 
frustrating surfing.
Surely, I've all standard LaTeX books and also read them... so I won't 
call me a beginnner, but after taking a look through the PDF- Reference 
Guide I felt like a noob !
Of course, I found the related sections in the PDF- Reference but 
whatever I do, I either get an error or the expected doesn't happen.

My first problem is the simple linebreak. The PDF- Reference says that 
the common string escape sequence like \n, \t, \r exists, but when 
trying to put an \n into the /Contents string, LaTeX gives me an error.

My second problem is the width of the annotation window when the 
annotation opens. Doesn't matter what value I do into the with option, 
it always opens a small sized window.

Here's what I made:
------------------

\pdfannot width 50mm height 1.5\baselineskip depth 0pt {
  /Subtype /Text
  /Name /Comment
  /C [1 0.92 0.75]
  /T (Possible URLs)
  /Contents (Testnote.
   Public accessible link ... IE specific fancy URL: 
http://....../Ljuskällor & Drifton)
}


Does anybody has helpful tips or links for me ?

-- 
Mit freundlichem Gruß / Kind regards

   Jörg Ebeling

------------------------------------------------------------------------

Soft- & Hardware Beratung Ebeling
Jörg Ebeling
Weserstieg 6

_*21079 Hamburg*_

*Germany*

eMail: joerg.ebeling at shbe.net
Tel.:   +49 - 40 - 646 008 0


More information about the pdftex mailing list