[pdftex] embedfile and links to children
Victor Ivrii
vivrii at gmail.com
Fri Nov 3 09:13:23 CET 2006
The source below makes foo.pdf with attached (produced separately)
yellow.pdf and with the link from
"Yellow Page 3" in foo.pdf to Page 3 of its yellow child.
Now, if I replace \attachfile{yellow.pdf} by embedfile{yellow.pdf}
link stops working. Am I missing something?
Thanks.
Victor
% foo.tex
\documentclass{article}
\usepackage{hyperref}
\usepackage{attachfile2}
\usepackage{embedfile}
\begin{document}
\attachfile{yellow.pdf} % file annotation is on page 1
\leavevmode
\pdfstartlink user{%
/Subtype/Link
/A<<
/S/GoToE
% Named destinations can be used, if the target file contain
% some (e.g. set by hyperref automatically or by the user
% via \hypertarget). Example:
% /D(section.1)
% Other kind of referencing. The first number is the
% zero based page number in the target file.
/D [2 /FitH 1000] % page 3
%/D (equation.2.2) %%% MY MODIFICATION
% /D [8 /XYZ null null null] % page 9
/T<<
/R/C % the target file is the embedded file (child),
% see PDF specification for more complicate
% relationships
% Currently attachfile and attachfile2 do not support embedded
% files that are not referenced by a file annotation, therefore
% the addressing scheme for file annotations is used:
/P 0 % page that contains the file annotation, zero based index
% attachfile does not support named file annotations, thus you
% have to use the zero based index in the Annots array
% (probably this is not trivial to know, if there are more than one
% annotation).
/A 0 % zero based index in the Annots array,
% /A 1 %%%%%% if secondattachment.pdf is referenced
%%%%%%%%% MY UNDERSTANDING THAT IF ATTACHMENTS ARE ANNOUNCED
%%%%%%%%% ON DIFFERENT PAGES IT WOULD BE /P 1 /A 0
% % use this method, if attachfile is used
% /A(foo) % this is the value of option annotname
% of \attachfile, see above,
% requires attachfile2
>>
>>
}\relax
Yellow Page 3\pdfendlink
\end{document}
More information about the pdftex
mailing list