Hi Aspose Support,
I am using Visual C# 2012 & Aspose.Words.dll ver 13.9.0.0 in a Rest Service which generates a PDF based on several MS Word document templates.
There is need to optimize the FontSettings.
Presently, whenever a PDF is generated, we have to call FontSettings.SetFontsFolder method as shown in the example below :
FontSettings.ResetFontSources();
var sources = FontSettings.GetFontsSources();
if (sources != null)
{
var source = sources.First();
if (source != null)
{
if (source.Type == FontSourceType.SystemFonts)
{
FontSettings.SetFontsFolder(pdfPath.Replace(Constants.Output, Constants.Fonts), true);
}
}
}
Can we upload the Fonts folder in Azure Blob Storage & then access the Azure Blob Storage & pass the folder path to FontSettings.SetFontsFolder method ?
How can we cache the FontSettings at startup so that we don’t need to call FontSettings.SetFontsFolder method again each time a PDF is generated ?
Can we put the FontSettings object in Application Cache ?
Please provide code example clearly showing how we can optimize the FontSettings.
Please let me know your views on the above.
Thanks,
Vivek Gupta