Hello,
Many of the files I’m converting from PDF to to PDFA-1a are passing the conversion step but not validation.
Is it a normal behavior to have files converted with Aspose pass conversion but not validation ?
Here’s the code i’m using:
this.document = new Document(input);
this.conversionOptions = new PdfFormatConversionOptions(target.getParent()+"/log.xml", formatOf(targetFormat).getValue(),
ConvertErrorAction.Delete);
isConverted = document.convert(conversionOptions);
LOGGER.info("Document {} conversion result : {}", document.getFileName(), isConverted);
document.optimize();
isValid = document.validate(conversionOptions);
LOGGER.info("Document {} conversion validity : {}", document.getFileName(), isValid);
if(isConverted && isValid) {
LOGGER.info("Saving Document {}", document.getFileName());
document.save(out);
}
document.close();