1

I'm wondering how to open in a new window an attached file when clicking on a bookmark. The code below links a bookmark to an attached file in the PDF file. But upon cliking it, the attached file is opened but also replaces the PDF that called it. What I'm trying to achieve is to open it in a new window.

Code:

\documentclass{article}
\usepackage{embedfile}
\usepackage{hyperref}
\usepackage{hypgotoe}
\usepackage{bookmark}

\begin{document}
\section{Hello World}
\embedfile{t.pdf}

\bookmark[   
  rawaction={
    /S /GoToE    % action type
    /D [0 /FitB] % view: fit
    /T <<
      /R /C      % relation: child
      /N (t.pdf) % name of embedded file
    >>
  },
]{Open embedded file t.pdf}
\end{document}

Code for generating the t.pdf file:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{Embedded file}
\newpage
Page two of embedded file.
\end{document}

1 Answer 1

1

According to the PDF spec (section 12.6.4.4), "embedded Go-To actions" allow the boolean key /NewWindow, so adding /NewWindow true to the rawaction dictionary will do what you want.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .