Getting object number in dvipdfmx from bann
Alexander Grahn
A.Grahn at hzdr.de
Wed Apr 10 12:23:39 CEST 2019
On Wed, Apr 10, 2019 at 10:10:52AM +0100, Joseph Wright wrote:
>In pdfTeX, when one creates a link using \pdfstartlink or a generic
>annotation using \pdfannot, the resulting object number can be accessed
>as \pdflastlink or \pdflasdtannot, respectively. However, in dvipdfmx,
>we can create link annotations using pdf:bann but there is no mention of
>getting at the object number. One could use the generic pdf:ann <object
>name> to work around this, but that seems a bit risky (dvipdfmx can't
>track the annotation begin/end), and painful. Is there a way to get at
>this data?
>
>(In dvips all links have to be created as generic annotations, so again
>one can get at the information. So it seems dvipdfmx is the most awkward
>case.)
Indeed, there is no way of getting access to the PDF object number of a
bann/eann generated annotation.
On the other hand it should be noted that although pdfTeX provides
\pdflastlink, the object number thus obtained is only of limited use, because
in general, calling \pdfstartlink and \pdfendlink may produce multiple
annotations (with individual PDF object numbers) if the link text is broken
across lines. To be useful, \pdflastlink should actually return an array of
object numbers.
Perhaps, in view of this pdfTeX limitation, the developper of the original
dvipdfm decided to do without a dedicated command for retrieving the annotation
object number.
Regards,
Alexander
More information about the tex-live
mailing list