We're using a non-standard font (Roboto) in our template. If we decide to include it directly in the word template (by using Word-features) we get some errors like "the document is broken" when opening after the generation (which is done as a stream that gets downloaded in the browser). Even tough the generated document can be repaired (and works in the end), it is not really nice for the user.
Therefore, we decided to include them in the Spire.Doc process by using the following code below.
- Code: Select all
document.EmbedFontsInFile = true;
document.PrivateFontList.Add(new PrivateFontPath("Roboto",
***));
document.PrivateFontList.Add(new PrivateFontPath("Roboto Thin",
***));
However, this doesn't seem to work, as we are not managing the styles in Spire.Doc but using the ones we built in to the docx file. Is there a possiblity to "just" include the fonts needed, without having to declare every single style in Spire.Doc? (We're generating a docx out of it).
Thanks for your suggestions.