Hello, I am trying to optimize my organization’s PDF sizes from those generated by Aspose.PDF .NET.
We currently are licensed on 19.9.0, but were testing out the 20.7.0 to see if the optimizations would make the PDFs smaller.
From a found forum post, I currently am applying these optimizations to any PDF document we convert.
var optimizationOptions = new OptimizationOptions
{
RemoveUnusedObjects = true,
RemoveUnusedStreams = true,
ImageCompressionOptions =
{
CompressImages = true,
ImageQuality = 50,
ResizeImages = true,
MaxResolution = 100,
Version = ImageCompressionVersion.Standard
},
ImageEncoding = ImageEncoding.Jpeg
};
doc.OptimizeResources(optimizationOptions);
We expected this to dramatically decrease the size of our PDF documents, but it actually is making them much larger. I will provide and example for you, of a sample PPTX document we are converting to a PDF with the applied optimizations.
Original Powerpoint: https://www.dropbox.com/s/qi5ohzb62dov3dl/bigPowerPoint.pptx?dl=0
Aspose Optimized PDF: https://www.dropbox.com/s/nbr6vy12jf5av9r/optimized.pdf?dl=0
Microsoft Optimized PDF: https://www.dropbox.com/s/53fht7pfdtmljok/bigPowerPoint.pdf?dl=0
You can see that the size of the Powerpoint is ~13MB and the size of the Optimized PDF is ~15MB. This is not isolated to Powerpoint, but even taking a regular PDF, applying the optimizations and saving seems to make the file larger as well. I have also attached the Microsoft Optimized PDF that was made within Powerpoint and saving that PDF, it comes in at around 3MB after optimization.
If there is any step that we are missing, I would appreciate any help that you can offer to me.
Thank you for your time.