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

Free Support Forum - aspose.com

Validate for PDFa complaince

I want to validate for pdfa compliance using Aspose. I am using the Validate method of Aspose.Pdf.Document class. The first argument is a string and if I provide a string like “validation.xml”, it throws an exception - Input string is not in correct format.

Also, is it possible to have a validation method which takes argument as an array or list of string instead of xml file as there might be issues with accessing and writing files.

Please let me know the details.

Hi Kdatt,

Thanks for using our products.

The first parameter of Validate method of Aspose.Pdf.Document class is string, which take OutPutFileName. I have tested the code and come to know that the only difference is you are using only file name but if you will use absolute path like "d:\\pdffiles\\test.pdf" then no exception will occurs.

Please do let us know if you need any further assistance and kindly shared code snippet you are using with us. This will help us to figure out the issue and reply back to you soon.

Thanks & Regards,


The problem is that I need to use a UNC path and not a path like c:…, as the users can log into the system using two different web servers and I do not want to configure the path in all the web servers that we use here.

I still feel that a variation which returns a list of strings will be very very helpful.


Hi Kdatt,

Thanks for your interest in our products.

Kindly use the below mentioned code to save the resultant PDF using UNC path.


Please try using it and feel free to contact us in case of any issue. We apologize for your inconvenience.

Thanks & Regards,