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

Free Support Forum - aspose.com

Unable to save document: receive error "Invalid xref type"

Opening and then saving the attached PDF documents raises an error of “Invalid xref type” at the save moment. Below is the sample code:


System.Windows.Forms.DialogResult dlgResult =openFileDialog1.ShowDialog();
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(openFileDialog1.FileName);
doc.Save(@“c:\temp\output.pdf”);

Hi Stacey,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for .NET 9.3.0, we have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWNET-37150 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,

Hi

I have recently experienced this error too, and a Google search led me to this thread. I have had some success in working around it.
The problem seems to be with PDF documents that are in PDF/A (archive) format. By converting the document to a standard PDF format (using Adobe Acrobat Pro), I was able to open and save it without error using Aspose.
Not sure if this affects other PDF formats.
This may not be a workable solution for you, but it might provide some assistance to Aspose developers looking to fix the problem.

Chris

Hi Chris,


We really appreciate your feedback. We have shared your findings with our development team and hopefully it will help us the investigating and resolving the issue. We will update our findings here as soon as we made some progress towards issue resolution.

Best Regards,

The issues you have found earlier (filed as PDFNET-37150) have been fixed in Aspose.PDF for .NET 21.11.