Sorry for the delay. I had to conduct some further investigations regarding this matter. I am attaching a PPT describing the issues. It’s in swedish but I think the pictures shows the issue clearly.
Here is the code we are using:
var wordLic = new Aspose.Words.License();
wordLic.SetLicense("Aspose.Total.lic");
MemoryStream pdfStream = new MemoryStream();
WordSaving.PdfSaveOptions saveOptions = new WordSaving.PdfSaveOptions();
saveOptions.Compliance = WordSaving.PdfCompliance.PdfA1b;
saveOptions.UseHighQualityRendering = true;
using (Stream read = listItemVersion.ListItem.File.OpenBinaryStream())
{
Words.Document dokument = new Words.Document(read);
dokument.Save(pdfStream, saveOptions);
}
return ConvertToPDFA(pdfStream);
private static MemoryStream ConvertToPDFA(MemoryStream inputStream)
{
MemoryStream stream = new MemoryStream();
var pdfLic = new Aspose.Pdf.License();
pdfLic.SetLicense("Aspose.Total.lic");
pdfLic.Embedded = true;
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inputStream);
bool result = pdfDocument.Convert(new MemoryStream(), PdfFormat.PDF_A_1A, ConvertErrorAction.Delete);
pdfDocument.Save(stream);
stream.Flush();
stream.Position = 0L;
return stream;
}
TDOK revidering 2.zip (727.8 KB)