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

Free Support Forum - aspose.com

Convert a PDF to PDF/PDF/A some document fails

Hi,


I have problem converting two PDF-files to PDF/A. It’s only these two that don’t work. Does anyone know why?

Error message: Input string was not i a correct format.

Regards Linda

Hi Linda,


Thanks for your inquiry. We have noticed the reported issue with one of your document(Ansökan+spridningstillstånd+SjöV+Skytteren(11909).pdf) and logged it as PDFNEWNET-37094 for further investigation and resolution. We will notify you as soon as it is resolved.

However your other document is already PDFA1b compliant. So to handle such documents you can verify conformance before PDFA conversion. Hopefully, following code snippet will help you to accomplish this.


//instantiate
Document instance
<o:p></o:p>

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(myDir + "pdfa_går_inte_igenom.pdf");

//Verify PDF/A compliance

bool pdfA= pdfDocument.Validate(myDir + "log.xml", PdfFormat.PDF_A_1B);

if (!pdfA)

{

//Convert to PDF/A compliant document

pdfDocument.Convert(myDir + "log.xml", Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);

}

//save output document

pdfDocument.Save(myDir + "pdfa_går_inte_igenom_PDFA.pdf");

Please feel free to contact us for any further assistance.


Best Regards,

The issues you have found earlier (filed as PDFNEWNET-37094) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.