I am new to ASPOSE and trying HTML to WORD and facing issues related to the font is not getting applied to the generated word document.
I tried adding the new fonts on my local computer as well but no luck.
The font is getting reset to Times New Roman in the generated word document.
I am using 21.3.0.0 version, any idea what I am doing wrong here, or do I need to do anything extra for the fonts?
Below is the code that I am using
string source = doc.DocumentNode.InnerHtml; // This is giving me the complete HTML of the page
using (var document = new Aspose.Html.HTMLDocument(source, new Aspose.Html.Url("BaseURLOfTheHostedWebsite")))
{
// Initialize DocSaveOptions
var options = new Aspose.Html.Saving.DocSaveOptions();
options.DocumentFormat = Aspose.Html.Rendering.Doc.DocumentFormat.DOCX;
options.FontEmbeddingRule = Aspose.Html.Rendering.Doc.FontEmbeddingRule.Full;
// Convert HTML webpage to DOCX
var docPath = Path.Combine(filePath, fileName);
Aspose.Html.Converters.Converter.ConvertHTML(document, options, docPath);
}
Thanks
Bobin Sondhi