I have a problem with creating pdf document that contains an attachment. This code works fine:
% <xetex — Unicode-based TeX engine>
\documentclass[12pt, a4paper, czech, twoside]{book}
\usepackage{hyperref}
\usepackage{attachfile2}
\begin{document}
My attached file is \attachfile{my.m}
\end{document}
but this code
\documentclass[12pt, a4paper, czech, twoside]{book}
\usepackage[xetex,
bookmarks={true}, % A set of Acrobat bookmarks are written
colorlinks={true}, % Colors the text of links and anchors.
linkcolor={red}, % Color for normal internal links.
anchorcolor={black}, % Color for anchor text.
filecolor={cyan}, % Color for URLs which open local files.
menucolor={red}, % Color for Acrobat menu items.
runcolor={blue}, % Color for run links (launch annotations).
urlcolor={magenta}, % Color for linked URLs.
unicode={true},
pdfauthor={Jaroslav Fait},
pdftitle={Wiking},
pdfsubject={study notes},
pdfkeywords={linear algebra, math, electronics},
pdfproducer={XeLateX with hyperref},
pdfcreator={Xelatex}]{hyperref}
\usepackage{attachfile2}
\begin{document}
My attached file is \attachfile{my.m}
\end{document}
no!!!. Notes (my.m is Matlab m-file).
The generated pdf document contain an attachment but could not be opened or saved, and the file name of the attachment is corrupted. The result of my investigation is such that the hyperref package shall not have any options. I use Miktex 2.9 (xelatex engine, last update) and Adobe reader X.