pdf-demo.zip (4.0 KB)
Aspose-Convert-PDF-To-PDFA-Promble.docx (15.1 KB)
When converting PDF to PDF-A, different files will report many errors.
For example, the log.xml generated from the PDF in the attachment is as follows.
Additionally, how to configure not to generate the log.xml file after conversion.
@Charlie_Zhu
Which PDF/A version are you converting the document to?
You can use a memory stream
document.Convert(new MemoryStream(), PdfFormat.v_2_0, ConvertErrorAction.Delete);
Currently, I am using 1b and have not tested any other types.
@Charlie_Zhu
When using the code below, the conversion is successful.
var doc = new Document(dataDir + "AA222.pdf");
doc.Convert(new MemoryStream(), PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
doc.Save(dataDir + "AA222-out.pdf");
All detected problems, both fixed and not, are displayed in the log.
If all messages in the log have Convertable=“True” - then everything is fine, the document is converted.
Convertable=“False” - the problem could not be fixed, the document is not converted.
logInfo.png (59.1 KB)
The conversion process has been found to be relatively slow. Is there any way to improve the conversion speed?
@Charlie_Zhu
How long does it take to convert in your environment?