[pdftex] \pdfstartlink attributes

Gerree Pecht gerree at Math.Princeton.EDU
Thu Aug 14 14:34:47 CEST 2008


Hello ...

What are you talking about?

I work on a Linux OS ... does this apply to me?

I was informed that I can't "edit" .pdf files from my system.

What do I need to be able to edit a .pdf file on Linux?

Is there a package that can be installed to accommodate such a
luxury?  Your comments/help is appreciated.  Thanks in advance.

Gerree :-)

On Wed, 13 Aug 2008, Heiko Oberdiek wrote:

> On Wed, Aug 13, 2008 at 11:58:42AM +0200, silvio mercadante wrote:
>
>> I'm trying to understand the attributes of the \pdfstartlink ...
>> \pdfendlink environment.
>> The PDFTeX manual says (p.34) that "Additional attributes, which are
>> explained in great detail in the PDF Reference, can be given via
>> ???attr spec ???."
>> Well, I can't undertand what's written in PDF Reference at all!  (Ehm,
>> needless to say, I'm not an expert of the PDF language...)
>
> \pdfstartlink (and many other primitives) are low level
> commands intended for experts. Use some of the
> higher user level macros (hyperref/latex, ConTeXt, ...) if
> you don't want to become an expert.
>
>> My needs are:
>> 1. What's the syntax of the <attr spec>?
>
> The contents of "attr" is put in a PDF dictionary. Therefore
> it must contain valid key value pairs. The key is always
> a PDF name object.
>
> For testing/debugging it is a good idea to look at the
> generated PDF file directly (using a text/hex viewer/editor).
>
>> 2. What are the possible attributes?
>
> PDF Reference.
>
> Both "attr" and "user" writes into the /Annot dictionary,
> see PDF specification "8.4.1 Annotation Dictionaries",
> especially Table "5.15 Entries common to all annotation dictionaries".
> In case of links: Table "8.24 Additional entries specific to a link
> annotation".
>
> Common keys for "attr": /F, /Border, /BS, /C, /H,
> but also /AP, /AS, /NM and other could be used.
>
> "user" must set /Subtype and /A.
>
> /Rect is set by \pdfstartlink and must not be set manually.
>
>> 3. Some examples.
>
> hyperref, ...
>
> find texlive2008/texmf-dist/tex -exec grep -H pdfstartlink {} \;
>
>> Al this to be able to customize the following TeX macro:
>>
>> \def\elink#1#2{%
>> \leavevmode%
>> \begingroup\pdfstartlink%
>> attr{/BS<</Type/Border/S/S/W 1>>}%
>> user{/Subtype/Link/A<</Type/Action/S/URI/URI(#1)>>}%
>> \ignorespaces#2%
>> \pdfendlink\endgroup%
>> }
>
> See hyperref's \href for URI actions.
> \href{http://www.somewhere.org/}{...}
>
> \elink isn't correct, if #1 contains unmatched parentheses,
> thus #1 should be at least passed through \pdfescapestring:
>
> \def\elink#1#2{%
>  ...
>  user{.../URI(\pdfescapestring{#1})>>}%
>  ...
> }
>
> Yours sincerely
>  Heiko <oberdiek at uni-freiburg.de>
>

-- 

Gerree P. Pecht
Princeton University Mathematics Department
(609) 258-3011



More information about the pdftex mailing list