Monday, June 16, 2008

Zip files inside PDFs

Adobe Acrobat allows you to attach other files to specific locations inside a PDF. In Acrobat 8, this is done via Comments > Comment & Markup Tools > Attach a File as a Comment. This embeds the file within the PDF, so that a recipient of the PDF can save the attachment to their drive. This is really handy for attaching other PDFs, Word, Excel or other file types to a specific location within a PDF.

However, if someone attaches a .zip file to a PDF, and you try to save or open the attachment, you will get the puzzling message "Acrobat cannot save the file attachment "filename.zip" because your PDF file attachment settings do not allow this file type to be saved." For security reasons, Adobe doesn't allow embedded .exe, .zip or .js file types to be saved out of a PDF, since these file types could conceivably harbor a virus. If you receive a file with this kind of attachment, even from a trusted source, there is no way, short of hacking around the Windows registry, to make Acrobat allow you to save or open the embedded file.

When someone tries to attach an .exe, .zip or .js to a PDF, they will receive the warning "The file type you are attaching cannot be opened or saved from Acrobat because of your PDF file attachment settings. If you trust the source of this file, click OK to attach it." So, curiously enough, they are warned, but allowed to continue. Which is odd, since no one downstream receiving the PDF can do anything with the attached files!

13 comments:

Steven K said...

thanks for this explanation

jack said...

hi i have one PDF file with Zip attachement i can not open this attaachment i think this is passowrd protected can i open this attachemnt with any password remover software

jack

Anonymous said...

Here is how to remove the policy block on Zip file attachments in Adobe PDF. These instructions work for Adobe Reader or Adobe Standard:

Open Regedit.exe
Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\\\FeatureLockDown\cDefaultLaunchAttachmentPermsReplacing and as appropriate e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockDown\cDefaultLaunchAttachmentPerms
Locate in the value list, .ZIP:3 and edit to read .ZIP:1 this changes the behaviour to prompt the user for an action (save or open).
Close Regedit and open Adobe.
You should now be able to open Zip attachments in PDF files.

Anonymous said...

Thanks for sharing this solution. Adobe allowed me to attach a zip file but does not allow me to extract it. Does not seem to be a good logic. It would be nice to give user a option. I am trying to open up my own attachment.

Anonymous said...

Here is the work around I use:

1) change the extension of the the zip file from .zip to .zipped. This can be done with the dos command:

ren "file.zip" "file.zipped"

2) now attach file with the .zipped extension to the PDF. (adobe will not complain about files with an .zipped extension)

3) add the following description to the attachment:

"save as .zip"

Anonymous said...

Install Sumatra pdf reader.
It has no problems saving and downloading zip files from pdf documents.

Anonymous said...

Here is how to remove the policy block on Zip file attachments in Adobe PDF. These instructions work for Adobe Reader or Adobe Standard:

Open Regedit.exe
Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\\\FeatureLockDown\cDefaultLaunchAttachmentPermsReplacing and as appropriate e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockDown\cDefaultLaunchAttachmentPerms
Locate in the value list, .ZIP:3 and edit to read .ZIP:1 this changes the behaviour to prompt the user for an action (save or open).
Close Regedit and open Adobe.
You should now be able to open Zip attachments in PDF files

WORKED Thanks

Anonymous said...

I installed Sumatra PDF as recommended in one of the comments and it solved my problem quickly and with no trouble.

Anonymous said...

>>Open Regedit.exe
Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\\\FeatureLockDown\cDefaultLaunchAttachmentPermsReplacing and as appropriate e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockDown\cDefaultLaunchAttachmentPerms
Locate in the value list, .ZIP:3 and edit to read .ZIP:1 this changes the behaviour to prompt the user for an action (save or open).


This worked! Thanks a ton for saving hours :)

Anonymous said...

Thanks so MMMMMMUUUUUCCCCHHHHHH for this tip. It WORKED!!! You saved my sanity!!!! :)

Anonymous said...

I tried to use sumatra, it does not work. it is just a regular reader. Waisted my time :(

Anonymous said...

Sumatra worked, thanks for the help!

Mariano said...

i have a pdf file that will not open with adobe, why? if i change the file type to zip i will see inside a pdf, that will ask me a password to open

any clue how to open this files?, are from the 90's and i lost the password, are old technical reference documents


thanks