[Tex/LaTex] Bookmark with a link to open the attachments pane

bookmarkshyperreflinkspdf

Is it possible to have a bookmark with a link to open the attachments pane?
If you carefully read hyperref packege you'll see that the \Acrobatmenu alows you to have links that enables you to open and show a lot of menus and options in Adobe Acrobat.
But I don't see any attachments pane option.

Is it possible? Is there any workaround or way to achieve this?

I've also looked with javascript but I can't find any info regarding this šŸ™

From this excelent site you can see the available options for \Acrobatmenu:

enter image description here

Thanks for the help

Best Answer

Officially the PDF format (specification) only supports four named actions: NextPage, PrevPage, FirstPage, LastPage.

It depends on the PDF viewer, which other non-standard actions might be supported.

The JavaScript API reference lists names in the description of method execMenuItem of object app. There the name ShowHideFileAttachment can be found. It does open the attachment tab, if it was closed, and closes it, if it was opened.

Example:

\documentclass{article}
\usepackage{hyperref}
\usepackage{bookmark}
\usepackage{embedfile}
\embedfile{\jobname.tex}
% \hypersetup{pdfpagemode=UseAttachments}
\begin{document}
\Acrobatmenu{ShowHideFileAttachment}{Show/hide file attachments}
\bookmark[ 
  named=ShowHideFileAttachment,
]{Show/hide file attachments}  
\end{document}

An alternative to open the attachment tab is the PageMode setting that is only used, when the document is opened:

\hypersetup{pdfpagemode=UseAttachments}

Combinations with other tabs (bookmarks/thumbs/...) are not defined in the PDF specification.

Related Question