I am generating multiple PDFs which will be placed in a zipped folder and made available to the user for download.
I followed the code from http://www.codeproje.../Zip-Files-Easy to create the zipped folder.
The problem is, the compressed folder is larger in size compared to the total size of all the PDFs contained in the folder. If my PDFs have a total of 70MB, my compressed folder has a size of 111MB.
I read the other developer's comments and they said that the following lines are concerned:
//Read all of the bytes from the file to add to the zip file byte fileByte = File.ReadAllBytes(filename); //Compress and write the bytes to the zip file pckgPart.GetStream().Write(fileByte, 0, fileByte.Length);
They say this only works for Text files. But PDFs become larger using this.
I would like to ask for your help regarding what to replace these lines with to compress the PDF to a smaller size?
This post has been edited by November-06: 02 July 2013 - 03:42 AM