2

Based on embed-hyperref-form-in-tikz-picture I 'd like to create a button to save a fillable pdf. However, once I open the pdf, no action. What did I miss ?

MWE

\documentclass{article}
\usepackage{hyperref}
\usepackage{tikz}

\begin{document}

\begin{center}
    \begin{Form}
        \begin{tikzpicture}
            \node[rectangle,rounded corners,fill=red!50] 
            {\Acrobatmenu{SaveAs,width = 4cm}{\Large{Save your exam !}}};
        \end{tikzpicture}
    \end{Form}
\end{center}


\end{document}
JeT
  • 3,020

1 Answers1

3

Your syntax is wrong. In the first argument there should be only an action. If you want to force a width, add e.g. a box to the second argument:

\documentclass{article}
\usepackage{hyperref}
\usepackage{tikz}

\begin{document}

    \begin{Form}
        \begin{tikzpicture}
            \node[rectangle,rounded corners,fill=red!50]
            {\Acrobatmenu{SaveAs}{\makebox[6cm]{\Large Save your exam !}}};
        \end{tikzpicture}

    \end{Form}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • Merci ! It works perfectly and I learnt something. – JeT Apr 13 '20 at 11:07
  • Interesting! Didn't know this Named action exists. Is there some list, possibly unofficial, with all supported named actions? – AlexG Apr 13 '20 at 11:12
  • 1
    @AlexG there is a list in the hyperref manual, but it is naturally viewer dependant, and I don't know if a current reader still uses this names. – Ulrike Fischer Apr 13 '20 at 11:22