Render Special Characters in PDF

Edit in →

SurveyJS PDF Generator supports standard 14 PDF fonts. However, these fonts do not include glyphs for certain special characters and lack support for languages that use non-Latin character sets. To properly render a PDF form in this case, PDF Generator needs a custom font. This demo shows how to use the Noto Sans Korean font to generate a PDF form with Korean characters. Read more...

Sorry, we can't retrieve the data from server. Please comeback later.

SurveyJS PDF Generator supports standard 14 PDF fonts. However, these fonts do not include glyphs for certain special characters and lack support for languages that use non-Latin character sets. To properly render a PDF form in this case, PDF Generator needs a custom font. This demo shows how to use the Noto Sans Korean font to generate a PDF form with Korean characters.

Call the DocController.addFont(fontName, base64, fontStyle) method to add a custom font to PDF Generator. This method accepts the following parameters:

  • fontName: string
    A custom name that you will use to apply the custom font.
  • base64: string
    The custom font as a Base64-encoded string. To encode your font to Base64, obtain it as a TTF file and use any TTF-to-Base64 online converter.
  • fontStyle: "normal" | "bold" | "italic" | "bolditalic"
    The style of the custom font.

To apply a custom font to a PDF document, assign its name to the fontName property in the IDocOptions object.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.