We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Compress PDF documents with OptimizeResources and CompressImages using Aspose.PDF for .NET - output in negative mode

Hello,

I’m using Aspose.PDF 20.4 with Developer Small Business licence.

I optimize pdf files then I combine them but sometimes, the final pdf is in negative mode.

I use OptimizeResources method with the following parameters :

var optimizationOptions = new Aspose.Pdf.Optimization.OptimizationOptions();
optimizationOptions.RemoveUnusedObjects = true;
optimizationOptions.RemoveUnusedStreams = true;
optimizationOptions.ImageCompressionOptions.CompressImages = true;
optimizationOptions.ImageCompressionOptions.ImageQuality = 50;
optimizationOptions.ImageCompressionOptions.MaxResolution = 900;
optimizationOptions.ImageCompressionOptions.ResizeImages = true;
pdfDocument.OptimizeResources(optimizationOptions);

The issue is caused by CompressImages property but I can’t explain why.
If I disable it, the final pdf is good.

Do you have any idea ?

I send you files for replicate the issue (the problem occurs with pages 1 and 2).
Test_page_1.pdf (124.3 KB)
Test_page_2.pdf (273.1 KB)
Test_page_3.pdf (1.7 MB)
Result_Ko_with_image_compression.pdf (1018.5 KB)
Result_Ok_without_image_compression.pdf (2.1 MB)

Thanks for advance.

David

@dte

We were able to notice this issue and logged it as PDFNET-48133 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Thank you for your response.

David

Hello,

I have one more question, for my information.

Do you have an idea of ​​the resolution time of this issue (weeks, months)?

Thanks for your work.

David

@dte

Thanks for your inquiry.

The issue has been logged under free/normal support model where issues have low priority and are resolved on a first come first serve basis. The resolution time of the issue depends upon how many issues are logged prior to it and how many are there which are logged under priority support. We will surely inform you as soon as we have some certain news on the resolution of the issue. Please spare us some time.

We are sorry for the inconvenience.