Save as PDF Compliance PDF/A incorrectly includes OpenType Font

In my code, I try to save a Words Document as PDF using compliance PDF/A using this code:

public override MemoryStream WordsToPdfStream(Stream stream)
    var ms = new MemoryStream();
    var doc = new Words.Document(stream);

    var saveOptions = Words.Saving.SaveOptions.CreateSaveOptions(Words.SaveFormat.Pdf)
        as Words.Saving.PdfSaveOptions;
    saveOptions.Compliance = Words.Saving.PdfCompliance.PdfA1a;
    doc.Save(ms, saveOptions);
    return ms;

causing it to embed the custom OpenType font being used within the document. While this seems correct, it actually violates PDF/A standard (at least according to numerous online tools for validation). The PDF appears correctly and all that it just isn’t a valid PDF/A.
Microsoft Word on the other hand, when saving as PDF, exports the text using the font as an image and doesn’t include the font within the PDF (thus passing the validation tools).
Is this a bug or is there a workaround.


Thanks for your inquiry. Please note that when saving document to PDF/A all fonts must be embedded in the PDF file. Could you please share the following resources here for testing?

  • Your input Word document and fonts that are used in it.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please share the steps that you are using to validate the PDF.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Yes, usually fonts are to be included but from what I can tell, that applies only to ttf fonts, not to otf.
Here are my word file as well as the word and aspose pdf output and the font used. (248.4 KB)
I used the online tool to validate my files. It also says that otf fonts are not to be included within the pdf. Why? I don’t know. But looking at the PDF/A that Word generates, it does convert the text to an image as to avoid including the font, so I guess they are onto something.


Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16061. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-16061) have been fixed in this Aspose.Words for .NET 17.12 update and this Aspose.Words for Java 17.12 update.
Please also check the following articles: