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

Free Support Forum - aspose.com

Aspose.PDF 18.11 Document Optimization Issues

I am using Aspose.PDF v18.11.0 and also with the latest version v19.10.0 with the below code snippet for Document Optimization
var optimizationOptions = new Aspose.Pdf.Optimization.OptimizationOptions();
optimizationOptions.RemoveUnusedObjects = true;
optimizationOptions.RemoveUnusedStreams = true;
optimizationOptions.AllowReusePageContent = true;
optimizationOptions.LinkDuplcateStreams = true;
optimizationOptions.UnembedFonts = true;
optimizationOptions.ImageCompressionOptions.CompressImages = true;
optimizationOptions.ImageCompressionOptions.ImageQuality = 50;
optimizationOptions.ImageCompressionOptions.ResizeImages = true;


in_original.pdf (64.3 KB)
out.pdf (46.8 KB)

I am using this code to compress the PDF document size after stripping off any possible Javascripts in the PDF document. It works on almost all documents and scenarios until I encountered with the attached document. It seems there are some issues with this code as the input document after getting processed is resulting in blackened output document. No error messages are thrown either. Attaching both input and output document for reference
Please let me know if you have resolved this issue or there is a workaround for such document compression without resulting in failure scenarios


We were able to replicate the issue in our environment with Aspose.PDF for .NET 19.10 and logged it as PDFNET-47245 in our issue tracking system. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.

Do we have an update on this?


Since the issue was logged under free support model, it has low priority and will be resolved on first come first serve basis. We will surely inform you as soon as we make some significant progress towards its resolution. Please spare us little time.

We are sorry for the inconvenience.