0

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 Answers2

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/

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
1

try font-family: "Segoe UI", sans-serif; or font-family: "Segoe UI", Arial, sans-serif;

mr. baby
  • 85
  • 7