I use the embedfile package in order to embed the LaTeX source code into the final PDF with the following code:
\documentclass{article}
\usepackage{embedfile}
\embedfile{\jobname.tex}
\begin{document}
The document
\end{document}
This works fine with pdflatex, but now I have to switch to XeLaTeX in order to use a custom TrueType font. However, the embedfile package doesn't support the program dvipdfmx used by XeLaTeX. Is there a way to modify the package to make it cooperate with dvipdfmx, or another package with similar functionality supporting this driver?
(This question is similar, but not identical, to
Attach files to PDF with dvipdfmx: In the answers to this question, a way to attach a file to a PDF using dvipdfmx is shown. This creates a visible icon in the document, which is not what I want: The embedded file should only appear in the list of attachments displayed e.g. by Acrobat Reader.)
\textattachfile{filename}{}should work. – Leo Liu Feb 05 '11 at 13:33attachfile2version was uploaded to CTAN, so you can now install the version supportingdvipdfmxby simply updating your TeX distribution. The temporary download link mentioned above doesn't exist any more. – diabonas May 26 '11 at 16:51