As I need to display different languages on a webpage (i.e. have multiple languages in text field then use PuppeteerSharp to print as PDF), how to install fonts in Azure Linux Function?
Asked
Active
Viewed 268 times
1 Answers
0
How to install fonts in Azure Linux Function
Inject html and replace the font from CDN
combine HTML code and CDN code
using(var page = await Browser.NewPageAsync())
{
await page.SetContentAsync("<div>My Receipt</div>");
var result = await page.GetContentAsync();
await page.PdfAsync(outputFile);
SaveHtmlToDB(result);
}
html = html.Replace("https://fonts.googleapis.com", "http://fonts.googleapis.com");

SaiSakethGuduru
- 2,218
- 1
- 5
- 15