skip to Main Content

I have used ‘Segoe UI’ font in HTML..HTML is converted to PDF using Sejda API, Then it is displaying default font on behalf of Segoe UI font..

    .ref {
        text-align: left;
        color: #717171;
        font-size: 12px;
        font-family: Segoe UI;
        font-weight: 700;
    }

2

Answers


  1. To fix the font issue when converting HTML to PDF using Sejda API you can do the following things:

    1. Add a fallback font:

      font-family: 'Segoe UI', Arial, sans-serif;
      
    2. Embed ‘Segoe UI’ font using @font-face in CSS. This method allows you to include the font directly in your HTML, making it available even if it’s not installed on the system performing the conversion:

      @font-face {
          font-family: 'Segoe UI';
          src: url('path/to/font.woff2') format('woff2'),
               url('path/to/font.woff') format('woff');
          font-weight: 700;
      }
      
    3. It’s also important to review the Sejda API documentation to ensure that there are no specific requirements for it. Check Sejda API documentation for font-related requirements: https://developers.sejda.com/

    Login or Signup to reply.
  2. try font-family: "Segoe UI", sans-serif; or font-family: "Segoe UI", Arial, sans-serif;

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search