# Open Data from Pdf-File with default Application

I have a rather big picture which I want to include into my LaTex document and respectively in the obtained pdf-File.

Since the picture does only fit properly if I scale it to illegibility, I wonder if I can produce a pdf with LaTex such that the pdf by itself opens the image with the default image viewer of the current OS. Alternatively the default Web Browser or anything else would work just as well since the file can be converted to html / pdf / eps / jpg and a few other formats.

I want a single pdf-file containing all the information, and, thus I want to avoid providing the Pdf-File + Image-File with the pdf-File containing a href link to the Image file.

Is there any way to do so?

• Yes, take a look at the pdfpages package. It allows you to insert external PDFs into your LaTeX document. – alexraasch Mar 17 '16 at 11:46
• If the picture is wider than heigh, did you consider putting it on its own landscape page? Or maybe in a larger page, like some books that have large folded pages. – Zoxume Mar 17 '16 at 11:47

## 1 Answer

You could use attachfile:

\documentclass[12pt]{article}
\usepackage{attachfile,graphicx}

\begin{document}

\textattachfile{example-image.png} {\includegraphics[scale=0.2]{example-image.png}}

\end{document}


If one doubleclick on the image the adobe reader will open it (after a security dialog) in an external application. The image will also be shown in the "appendix".