Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to include an .XLS file inside a PDF, so that the user could open/extract the spreadsheet from their PDF viewer? (Maybe in the same manner MS Word allows you to include a DDE object?) It would not need to show any spreadsheet content or anything fancy like that; I am just looking for a way to have the spreadsheet included with the PDF file.

If so, what tools would I need to do it?

share|improve this question
Do you mean displaying a link or icon in the pdf which, when activated, will open an Excel spreadsheet? – music2myear May 23 '11 at 20:08
@music2myear Sort of... I'm thinking of publishing an ebook and want to include a spreadsheet (with macros) as part of the purchase. Rather than going through a huge fuss with the publisher about having unique download codes for each customer or something like that, I'd prefer to have the file included in the PDF that people buy. (Then again, if I want the book enabled on Kindle or such, then maybe I need to do the external download anyway...) – ewall May 24 '11 at 14:01
up vote 3 down vote accepted

This may be a start until it becomes more clear what it is you are asking. Acrobat 8 (and thus, subsequent versions) include the ability to package files of different types within a pdf file:

UPDATED in response to comment: I did a google search for "create pdf packages" and there appear to be several applications that cost less than Acrobat that offer this capability. I could not find an open source or free option to do this, though. Ghostscript tries to be a pretty full-featured system for creating PDFs and with more research I believe it's the best place to look for open source creation of PDF packages.

share|improve this answer
Excellent... that is the feature I'm looking for. Do you know if any PDF software other than the full Acrobat Suite can make packages? – ewall May 24 '11 at 13:58

The Free (as in liberty) and free (as in beer) commandline utility pdftk is available for all major OS platforms (Unix, Linux, Windows, Mac OS X). It has a sub-command to embed external files into a PDF. Try this:

 pdftk.exe ^
   original.pdf ^
   attach_files file1.docx file2.xls file3.html ^
   to_page 3 ^
   output file-with-attachments.pdf

The attached files will be indicated to belong to page 3 of the output PDF. To de-tach the files embedded in a PDF, try this:

pdftk.exe ^
  file-with-attachments.pdf ^
  unpack_files ^
  output c:\path\to\directory\

All attachments will then be stored in the named output directory.

share|improve this answer
Y'know, I think I've used pdftk before to fix corrupted PDFs. (BTW, I accepted @music2myear's answer but gave you some points as well for answering the second part of the question.) – ewall May 25 '11 at 16:40

If you get cutePDF professional you can embed a file by doing this:

Tools menu > Commenting > Attach file

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .