As explained e.g. here, JavaScript can be added to a pdf using latex.
Can someone provide me with an example, how I can add a JavaScript to an image in the pdf that executes when the image is clicked?
As explained e.g. here, JavaScript can be added to a pdf using latex.
Can someone provide me with an example, how I can add a JavaScript to an image in the pdf that executes when the image is clicked?
\documentclass{article}
\usepackage{graphics}
\usepackage{media9}
\usepackage{mwe}
\begin{document}
\mediabutton[
jsaction={app.alert('hello world!');}
]{\includegraphics{example-image}}
\end{document}