VBdotnet2005
asked on
compress pdf
Is there a .net object to compress pdf file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@James... for the most part you are in fact quite right. Most PDFs are already well compressed there is often no noticeable file size reduction. However, I have seen some cases where we generate PDF exports on some systems and the PDFs are quite big, but once say you open the PDF and save it in Acrobat Processional, there is a noticeable reduction in file size. That said, I'm not sure an implementation based on GZipStream and DeflateStream will compress the PDF internally (well... easily)... Those are fine is the intent is to send out the resulting file just as a ZIP file or something.
We've experimented with MultiValent (Java) on a bulk PDF reports distribution platform for a billing company. I must say, we noticed a 10-15% size reduction but we just thought the extra processing didnt really add much benefit to our cause. Due to other considerations, we eventually ported the app to C# and used Crystal Reports (with PDF exports) and I dont see that much of a problem with the PDF file size.
We've experimented with MultiValent (Java) on a bulk PDF reports distribution platform for a billing company. I must say, we noticed a 10-15% size reduction but we just thought the extra processing didnt really add much benefit to our cause. Due to other considerations, we eventually ported the app to C# and used Crystal Reports (with PDF exports) and I dont see that much of a problem with the PDF file size.
ASKER
We said everyone. Thank you so much.
.NET has 2 classes that can be used for file compression: GZipStream and DeflateStream. Look for those in the documentation. The sample code given for DeflateStream shows how easy it is to use.