Hello everyone,
I am trying to convert a word template document which has Font : Franklin Gothic Book
When I convert the word document into pdf, I lose the font Franklin Gothic Book and the pdf shows the default font Arial
How do I programmatically change the font to Franklin Gothic Book ?
Should I programmatically change the font when I have the word document or should I change the font after converting to pdf and then programmatically change the font
Thanks
kshah05
@kshah05 Please ensure that the desired font is installed and available in the environment where your application is running. If the target font is not available, Aspose.Words API will automatically substitute it with a similar font to ensure proper rendering of your document. To check if a font is being substituted, you can implement the IWarningCallback
interface and monitor any warning messages related to font substitution. This will help you identify if there are any font substitution issues in your application.:
public class IssueCallBack : IWarningCallback
{
public void Warning(WarningInfo info)
{
Console.WriteLine($"{ info.Description}");
}
}
doc.WarningCallback = new IssueCallBack();