简体   繁体   中英

How to change font for Puppeteer Sharp in C#

I am using Puppeteer Sharp in C# which is deployed to Azure Linux Function. I mentioned font-family in html page. How can I print PDF by using target font, eg Roboto font?

Below may be possible solutions but I don't know how to perform or whether available below:

  1. Change PDF font by using PuppeteerSharp's API (I could not find this)
  2. Install target font in Azure Linux Function

Supplement: I would like to print out different languages on a page but it cannot print such characters.

在此处输入图像描述

You can basically inject some html code and replace the font from a CDN. You can wire a custom solution by combining these two.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM