Answer the question
In order to leave comments, you need to log in
How to assign custom font in sejda htmlToPDF?
Hello. There is a service that converts HTML to PDF, but it does it through its own server: https://www.sejda.com/developers#html-pdf-api . It rejects all the fonts that I would give it, but swallows it without problems Google fonts. If you throw him a link to the Roboto font in Google Fonts, then everything is fine, but if you put him like this:
/* cyrillic-ext */
@font-face {
font-family: 'myfont';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('roboto-v27-latin_cyrillic-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('roboto-v27-latin_cyrillic-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('roboto-v27-latin_cyrillic-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('roboto-v27-latin_cyrillic-regular.woff') format('woff'), /* Modern Browsers */
url('roboto-v27-latin_cyrillic-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('roboto-v27-latin_cyrillic-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question