I am using the package attachfile to attach a file to the pdf (generated with pdfLaTeX) with the following code
\documentclass[twoside,a4paper,10pt]{article}
\usepackage{attachfile}
\begin{document}
\title{XXX}
\author{YYY}
\maketitle
Here is the file I attached: \attachfile{file.txt}
\end{document}
It compiles without any problem and the pdf will be generated then. But if I open it in Adobe Reader X, it crashes. Interestingly, if I open that in Acrobat 7, it works. Is that any better way to insert file to the pdf so to support different version of pdf reader?