Hi.
I am currently evaluating Aspose.PDF.
Basically, I want to be able to convert existing PDF to PDF/A-2b and Words documents to PDF/A-2a (will be testing Aspose.Words for that).
Early in my testing, I noticed some strange behavior. I assumed that pdfDocument.Convert would return true if the conversion was a success and false otherwise.
Using a very simple pdf document (a word doc saved as a normal PDF from within word, attached here), I tried this :
if (pdfDocument.Convert(logFile, PdfFormat.PDF_A_1A, ConvertErrorAction.Delete))
pdfDocument.Save(outPath);
assuming it would return false, because converting a PDF to PDF/A-1a should be nearly impossible, according to Adobe. But then the result of the call is true...
Problem is, the result file is not even claiming to be a PDF/A and sure fails Adobe preflight validation.
After the call to Convert, before saving the document, if I call Validate, I get a false indicating the new document isn't compliant. But as the documentation states that convert call validate, I would not have tought about calling it afterwards.
Doing the same thing with a scanned document seems to be OK and a valid PDF/A-1a is generated... which could be a bit weird, understanding that a scanned document has no structured information to be preserved as an "a" conformity should do. I guess this has more to do with using the product in a sensible way...
In real life, I would only produce PDF/A-1a from Word documents, but I would like to be sure what return values to expect from the methods, if I'm using the api in the correct way and most of all, knowing I can rely on the result of the convert method.
Regards
Jerome