• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zipped PDFs yields corrupt zip file

#1
[eluser]Unknown[/eluser]
Using: dompdf (http://codeigniter.com/wiki/PDF_generati...ng_dompdf/), zip encoding class
Version: 1.7.2

The workflow goes as follows:
After a message is created and the members that will be given the message selected, the application creates a pdf file of each message for each member, zip these pdf files and then stream to user.

When the pdf files are just purely text + the [x] image put in by dompdf for images not found, the downloaded archive can be opened. When I got the images to render on the pdf files, the archiving started yielding corrupt zip files. I verified that the pdf files with images can be opened by opening it from the source folder.

Could this be a bug in the Zip Encoding class or just in zip files in general?

Trying to open it from Ubuntu using 7z and unzip, respectively:
Code:
[email protected]:/tmp$ 7z e apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,2 CPUs)

Processing archive: apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip

Error: Can not open file as archive

[email protected]:/tmp$ unzip apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip

Archive:  apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip or
        apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip.zip, and cannot find apo_email_batch_00097d6e1fce8bcbb31cb60761dc431a.zip.ZIP, period.


Messages In This Thread
Zipped PDFs yields corrupt zip file - by El Forum - 08-11-2010, 01:24 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.