hello:
When I compressed the PDF file with the following code, it throws a exception which is “System.ArgumentOutOfRangeException”:
Aspose.Pdf.Document pdoc = new Aspose.Pdf.Document(datadir+“test.pdf”);
Aspose.Pdf.Optimization.OptimizationOptions op = Aspose.Pdf.Optimization.OptimizationOptions.All();
op.ImageCompressionOptions.CompressImages = true;
op.ImageCompressionOptions.ResizeImages = true;
op.ImageCompressionOptions.ImageQuality = 72;
op.ImageCompressionOptions.MaxResolution = 72;
pdoc.OptimizeResources(op);
pdoc.Save(datadir+“test.compress.pdf”);
Attached is the test pdf.test.pdf (399.9 KB)