|
|
< Day Day Up > |
|
Hack 12 Unpack PDF Attachments (Even Without Acrobat)
Save attachments to your disk, where you can use them. Authors sometimes supplement their documents with additional electronic resources. For example, a document that displays large tables of data might also provide the reader with a matching Excel spreadsheet to work with. PDF's file attachment feature is an open-ended mechanism for packing any electronic file into a PDF like this. As discussed in [Hack #54], these attachments can be associated with the overall document or with individual pages. You can unpack PDF attachments to your disk using Acrobat, Reader, or our pdftk [Hack #79] . After unpacking an attachment, you can view and manipulate it independently from the PDF document. 1.13.1 Unpack Attachments with Acrobat or ReaderIn Acrobat/Reader 6, you can view and access all PDF attachments by
selecting Document In Acrobat 5, you can view and access a document's
page attachments using the Comments tab. Open
this tab by selecting Window Reader 5 and earlier versions do not enable you to unpack attachments. 1.13.2 Unpack Attachments with pdftkpdftk simply unpacks all PDF attachments into the current directory. Future versions might introduce more control. For now, invoke it like this: pdftk mydoc.pdf unpack_filesIf the PDF is encrypted, you must supply a password, too: pdftk mydoc.pdf input_pw bazpass unpack_files Unpacking a PDF's attachments does not remove them from the PDF. You can always unpack them again later. 1.13.3 Hacking the HackDispense with the command line [Hack #56] to create a quick right-click action for unpacking a PDF with pdftk on Windows. |
|
|
< Day Day Up > |
|