Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Mar 07, 2018 2:38 pm

Hy,

I need to use the stream compression function existing in pdf 1.5 and up.
Spire.Pdf has this function? How to invoke/activate? ( note: in the ItextSharp i invoke the "SetFullCompression" to stream compression).

(PS: the pdf 1.5 and up supports compressionlevel 0..9 and stream compression to reduce the pdf size)

thanks,
JD

aibizcore
 
Posts: 12
Joined: Fri Dec 29, 2017 12:12 pm

Thu Mar 08, 2018 3:36 am

Hi,

Our Spire.Pdf supports reducing pdf file size by compressing Pdf content or Pdf image. Below are corresponding tutorials for your kind reference.
How to compress PDF content.
How to compress PDF images.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Fri Mar 16, 2018 10:26 am

Hi,

Greetings from E-iceblue.
Did we resolve your issue?
Thanks in advance for your valuable feedback and time.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Wed Feb 20, 2019 10:09 pm

We have a large PDF document, sample is about 26 pages and file size is about 3MB. We tried to do the compression when the documents are merged together but no difference was seen. We also tried compressing the completed merge document before saving, again no difference was found. We used the sample shown in the code demo.

here is a sample of the code change just before the merge file was saved
mergeDoc[0].FileInfo.IncrementalUpdate = false;
mergeDoc[0].CompressionLevel = PdfCompressionLevel.Best;
mergeDoc[0].SaveToFile(@PDFOutputPath + PDFOutputFileName);

Is there something wrong with the sample i've included?

Thank you,

damadake
 
Posts: 20
Joined: Wed Jan 18, 2017 12:56 pm

Thu Feb 21, 2019 2:27 am

Dear david,

Thanks for your inquiry.
To help us look into your case better, please provide your large PDF file for testing. The large PDF can't be attached here due to the forum size limitation. Please send it to our email (support@e-iceblue.com), or upload it via OneDrive or DropBox and then share us with the link to download. Thanks in advance.
Additionally, if your PDF file contains many high quality images, you could try to reduce file size by compressing images.
How to Compress PDF Images

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Thu Feb 21, 2019 12:52 pm

There are no images in these PDF's, they are all text. I will have to get approval to upload. These PDF's are legal documents

Thank you

damadake
 
Posts: 20
Joined: Wed Jan 18, 2017 12:56 pm

Thu Feb 21, 2019 5:13 pm

Providing an update on this. I re-opened my templates in Acrobat X Pro and saved with the "reduce size PDF" option and retested. Size decrease was pretty dramatic and solved my size issues so no need to compress in Spire.

Thanks

damadake
 
Posts: 20
Joined: Wed Jan 18, 2017 12:56 pm

Fri Feb 22, 2019 1:38 am

Hi,

Thanks for your feedback.
If you need further assistance in the future, please feel free to write back.
Have a nice day!

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF