- Code: Select all
using (var inputStream = new MemoryStream(_fileData))
using (var outputStream = new MemoryStream())
using (var originalDoc = new PdfDocument(inputStream))
using (var archiveableDoc = new PdfNewDocument { Conformance = PdfConformanceLevel.Pdf_A1B })
{
foreach (PdfPageBase page in originalDoc.Pages)
{
SizeF size = page.Size;
PdfPageBase p = archiveableDoc.Pages.Add(size, new PdfMargins(0));
page.CreateTemplate().Draw(p, 0, 0);
}
archiveableDoc.Save(outputStream);
return outputStream.ToArray();
}
But when I validate the converted file using the pdf-tools.com-form I get warnings about that the fonts are not embedded.
I've tried to follow your example in the Program Guide. What am I missing here? Is there an alternate way to invoke the conversion?
I'm using Spire.Office 2.15.1 with Spire.Pdf.dll version 3.8.67.4020.