Fonts
Fonts work the same way as they would in the browser.
Hosted Webfont
You can add a link to any hosted webfont stylesheet, such as:
- Google Fonts or Typekit,
- Self-hosted fonts on an existing website.
To use these fonts when converting to PDF, you will have to link the stylesheet in your HTML. Given that HTML5 supports <link>
placement in the <head>
and <body>
, you can place the link in either location, or inside your React component.
HTML
React
Local Webfont
You can also use local webfonts. To do this, you will need to include the font files as an asset when uploading with the Onedoc SDK. You can then reference the font in your CSS.