I’m using Aspose.Pdf 6.8.0.0 (2012.03.01), .NET 2.0 version.
The conversion from regular PDF to PDF/A seems to fail quite often with complex/large PDFs. The PDFs below are not important in themselves, just samples about failures.
http://www.pdfpictures.com/pdf/download.php?name=bonbini.pdf http://www.pdfpictures.com/pdf/download.php?name=CNTower-Standard.pdf http://www.pdfpictures.com/pdf/download.php?name=Seybold_Report-9_12.pdf
Aspose.Pdf.Document pdfA = new Aspose.Pdf.Document( srcFilePath );
pdfA.Validate( logfilePath, Aspose.Pdf.PdfFormat.PDF_A_1B );
Error in Validate:
Index was outside the bounds of the array. Convert fails with the same error.
The XML log file is interrupted, it ends with e.g. “The actions ‘JavaScript’ is prohibited</Pr”
Also one of our internal PDFs (14,6MB) caused “Invalid pointer. (Object reference not set to an
instance of an object.)” error in Validate.
http://lomake.kansanelakelaitos.fi/kela/kela.fi/fi/tiedostot/23062/OT15_W.pdf
http://lomake.kansanelakelaitos.fi/kela/kela.fi/fi/tiedostot/22945/OT3_W.pdf
Aspose.Pdf.Document pdfA = new Aspose.Pdf.Document( srcFilePath );
pdfA.Convert( logfilePath, Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete );
pdfA.Save( destFilePath );
Invalid pointer. (Value cannot be null. Parameter name: item)
With “ConvertErrorAction.None” the conversion succeeds and seems to remove at least most of the form elements, but Aspose still shows lots of validation errors in the XML log if the converted version is validated again.
The practical difference between ConvertErrorAction.None and ConvertErrorAction.Delete is somewhat unclear to me, could someone also clarify that?