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

Free Support Forum - aspose.com

Error Running OptimizeResources On Pdf

When Running the following Code:

        Document pdf = new Document(@"spliterror_jan4410.page3.pdf");
        pdf.OptimizeResources(new Document.OptimizationOptions()
        {
            RemoveUnusedStreams = true,
        });

On the following file:

I get Error:

: Unable to read beyond the end of the stream.
at .. ( , & )
at . ( , & )
at . (Byte[] , , & )
at .()
at .( , , Boolean , Boolean )
at Aspose.Pdf.OperatorCollection.()
at Aspose.Pdf.OperatorCollection.get_Count()
at Aspose.Pdf.OperatorCollection..MoveNext()
at Aspose.Pdf.Page.(OperatorCollection , Dictionary2 , Resources , ) at Aspose.Pdf.Page.(OperatorCollection , Dictionary2 , Resources , )
at .(OptimizationOptions )
at Aspose.Pdf.Document.OptimizeResources(OptimizationOptions strategy)

@PeteLee

Thanks for contacting support.

We were able to observe similar issue in our environment and logged it as PDFNET-45728 in our issue tracking system for the sake of investigation. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.