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

Free Support Forum - aspose.com

PDF to PDF/A conversion exception: Input string was not in a correct format

Hi! I am experiencing a problem with conversion of some pdf documents to PDF/A format. The same code works for most documents, but sometimes it fails (an example of document causing problems is attached). Have tried both 6.4 and 6.7 versions of Aspose.Pdf.dll.

The following code is used:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdfStream);

pdfDocument.Convert(logFilePath, PdfFormat.PDF_A_1A, ConvertErrorAction.None)

It gives the following exception:

System.FormatException: Input string was not in a correct format.

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)

at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)

at System.Convert.ToDouble(String value, IFormatProvider provider)

at . . (String , String , Int32 )

at . . ( )

at . . ( )

at . . ()

at . . (XmlTextWriter , PdfFormat , , Boolean , ConvertErrorAction )

at .œ. (XmlTextWriter , PdfFormat , Boolean , ConvertErrorAction )

at Aspose.Pdf.Document.Convert(String outputLogFileName, PdfFormat format, ConvertErrorAction action)

Log file specified in logFilePath is empty.

Any ideas what causes the problem with conversion?

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

Thank you for sharing the template file and sample code.

I am able to reproduce your mentioned issue regarding PDF to PDF/A conversion. I have registered an issue in our issue tracking system with issue id: PDFNEWNET-33295. You will be notified via this forum thread regarding any update against your reported issue.

Sorry for the inconvenience,

Hi again!

This issue is quite critical for our project. Is there any time plan or estimate when this issue will be fixed? Is it the next release?

Or maybe you could give some information about what is causing the problem with conversion for the attached file, so we could solve the problem by changing the way such PDF is generated.

Hi Mikael,

Thanks forYour patience.

Your reported issue (PDFNEWNET-33295) in this thread has been fixed and will be included in our upcoming release of Aspose.Pdf for .NET v6.8 (To be released in first half of March 2012). You will be notified via this forum thread once the latest version is available for download.

We apologize for your inconvenience.

Thanks & Regards,