1

When include graphics is put inside textattachfile from the attachfile2 package the image does not appear in the print preview or actual printing when using acrobat reader. Is it possible to get it to print without needing to resort to an online version and a version for printing?

Minimal Example:

\documentclass[]{article}
\usepackage{attachfile2,graphicx}

\begin{document}
    \textattachfile{image.png}{\includegraphics{image.png}}
\end{document}
1

The non-printing seems to be a bug in AR because the print flag is set.

As workaround the image can be put outside of \textattachfile:

\documentclass[]{article}
\usepackage{attachfile2,graphicx}

\begin{document}
  \leavevmode
  \rlap{\includegraphics{image.png}}%
  \textattachfile{image.png}{\phantom{\includegraphics{image.png}}}
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.