Free Support Forum - aspose.com

Conversion from PDF to PDF/A fails with several PDFs

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?

Hi Juho,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template files.

I am able to generate both your issues using your template files. Your issues are registered in our issue tracking system as mentioned below:

PDFNEWNET-33463: Validation Error: Index was outside the bounds of the array.

PDFNEWNET-33464: Conversion Error: Invalid pointer. (Value cannot be null. Parameter name: item)

You will be notified regarding any updates against your reported issues via this forum thread.

Sorry for the inconvenience,

Hi there,

are there any Updates on this Issue?

Best Regards

Hi Daniel,


Thanks for your inquiry. I’m afraid PDF to PDF_A_1A format conversion is currently not supported. We do have plans to implement this feature but it will be supported in sometimes later this year (2013). However you can validate PDF file against PDF_A_1A standards using Validate(…) method of Document class. Please check following link for the details.


Sorry for the inconvenience faced.

Best Regards,