Hello,
I am using Aspose.Pdf to validate and convert PDF files to conform to the PDF/A standard. In the process, it was noted that when saving a PDF file that was initially marked as PDF/A compliant (Sample_input.pdf) the processed file loses the “PDF/A Compatible” mark (Sample_output.pdf).
Sample_input.pdf (4.4 MB)
Sample_output.pdf (4.3 MB)
Sample_output.pdfvalidation-result-A1A.zip (767 Bytes)
Code used (C#):
using (var doc = new Document(input))
{
doc.Validate(output + "validation-result-A1A.xml", PdfFormat.PDF_A_1A);
doc.Optimize();
var options = new PdfFormatConversionOptions(PdfFormat.PDF_A_1A, ConvertErrorAction.None)
{
OptimizeFileSize = true,
ExcludeFontsStrategy = RemoveFontsStrategy.SubsetFonts | RemoveFontsStrategy.RemoveDuplicatedFonts
};
doc.Convert(options);
doc.Save(output);
}
What is the reason that the file loses PDF/A compatibility and how can this be avoided?