I would like to attach a file to a PDF document. I've discovered the attachfile and attachfile2 packages. How should I choose which of those to use? Is there a general rule of thumb (e.g., "always use attachfile2, it is strictly better")?

I've read the documentation and the changelogs, but I'm still fuzzy on how to choose between them.

  • attachfile2 is the package more up to date and extends attachfile, so I would say, use the newer one. – user31729 Jun 1 '14 at 19:08

Package attachfile2 is based on attachfile. The latter package is loaded by the former. attachfile2 adds features (in comparison to attachfile 2005/02/20 v1.2):

  • New driver options dvips, dvipdfmx, xetex, driverfallback.
  • New options final and draft.
  • Option scale for scaling the annotation rectangle.
  • Options file and nofile (for controlling the generation of .atfi).
  • New option ucfilespec for file names with characters outside ASCII.
  • Wider range of color specifications (even more, if package xcolor is loaded).
  • Meta data about the files are collected by the Perl script pdfatfi.pl and populates the file parameter dictionary in the PDF file.
  • Bug fixes.

See the documentation of package attachfile2.

I haven't checked, whether there are changes of attachfile since 2005 that affects attachfile2.

| 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.