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;
}
To fix the font issue when converting HTML to PDF using Sejda API you can do the following things:
Add a fallback font:
font-family: 'Segoe UI', Arial, sans-serif;
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;
}
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/