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