Good day
I'm trying to use wkhtmltoimage (part of wkhtmltopdf) to generate screenshot of websites. I'm trying to use css with some websites, but cant manage to figure out what is wrong
I've looked in the previous posts and I've generated the following base64 for Tahmoa font
@font-face {
font-family: 'Tahoma';
src: url(data:font/truetype;charset=utf-8;base64,AAEA..[LONG STRING]..AA=) format('truetype');
}
I have the following css file where I use it in my css file.
This is test.css file (where I'm doing something wrong?)
@font-face {
font-family: 'Tahoma';
src: url(data:font/truetype;charset=utf-8;base64,AAEA..[LONG STRING]..AA=) format('truetype');
}
h2{
font-family:'Tahoma'
background-color:red;
}
p{
font-family:'Tahoma'
background-color:yellow;
}
body{
font-family:'Tahoma'
background-color:green;
}
I pass the file to file as command line argument, but it has not effect. if I pass a background color embedded in the file, something like
data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==
which is a red background color, it works ok, and i get the red background for the image.
I want to be able to use regular css file and be able to specify the fonts as well.
Any suggestion is more than welcome.
Edit: I've tried all the solution on this question and others but still no where
Same Problem with soultion (did not work with me)
Tx