I am converting a pdf file into PDF/A using the following commans:
- Code: Select all
PdfDocument OriginalDoc = new PdfDocument();
OriginalDoc.LoadFromFile("test.pdf");
PdfNewDocument newDOC = new PdfNewDocument();
newDOC.Conformance = PdfConformanceLevel.Pdf_A1A;
foreach (PdfPageBase page in OriginalDoc.Pages)
{
SizeF size = page.Size;
PdfPageBase p = newDOC.Pages.Add(size, new Spire.Pdf.Graphics.PdfMargins(0));
page.CreateTemplate().Draw(p, 0, 0);
}
newDOC.Save("result3.pdf");
System.Diagnostics.Process.Start("result3.pdf");
If I use a pdf/a validator I get an error message like this:
"The document contains characters' fonts not suitable for long-term conservation".
I think that the problem is due to not embedded fonts.
I am using a trial version of the libraries and I cannot figure out if the error regards the line
"Evaluation Warning : The document was created with Spire.PDF for .NET."
or it is a real conversion error.
Could you help me please?
Thanks a lot