[pstricks] hyperref trouble
Alexander Grahn
A.Grahn at fzd.de
Wed Apr 22 16:55:17 CEST 2009
On Wed, Apr 22, 2009 at 02:19:56PM +0200, Patrice Mégret wrote:
>Dear all,
>
>I would like open pdf files from slides and for that I use hyperref and powerdot.
>
>By clicking on text, I open the second pdf file in a new window (pdfnewwindow=true) but not on page 2 (pdfstartpage=2).
Try the following, works with LaTeX/dvips/ps2pdf as well as with pdfLaTeX.
Regards,
Alexander
\documentclass{article}
\usepackage{hyperref}
\hypersetup{pdfnewwindow=true}
\usepackage{ifpdf}
\makeatletter
\newcommand\remoteGoTo[3]{%
\leavevmode%
\ifpdf
\pdfstartlink%
attr{%
/Border [\@pdfborder]
/H \@pdfhighlight\space
/C [\@filebordercolor]%
}%
user{
/Subtype /Link
/A <<
/S/GoToR
/F (#1)
/D [\number\numexpr#2-1\relax \@pdfstartview]
\Hy at SetNewWindow
>>
}%
#3%
\pdfendlink%
\else%
\pdfmark[#3]{
pdfmark=/ANN,%
Subtype=/Link,%
AcroHighlight=\@pdfhighlight,%
Border=\@pdfborder,%
Raw={%
/C [\@filebordercolor]%
/A <<
/S/GoToR
/F (#1)
/D [\number\numexpr#2-1\relax \@pdfstartview]
\Hy at SetNewWindow
>>
}%
}%
\fi%
}%
\makeatother
\begin{document}
This \remoteGoTo{Test4pages.pdf}{2}{link} takes you to page 2 of Test4pages.pdf.
\end{document}
More information about the PSTricks
mailing list