CSS conic-gradient issue
zsebalint opened this issue · 2 comments
zsebalint commented
Hi, the conic-gradient css rule not working in the generated pdf
.someClass {
width: 100px; height: 100px;
border-radius: 50%;
background: conic-gradient(#655655 40deg, yellowgreen 0);
}
I've got a circle, but the coloring is not working. Can you help me?
This option is not help: printOptions: { printBackground: true }
westy92 commented
I just tried this on macOS 11.3 and Chrome 90. The result worked as expected: test.pdf
const options: HtmlPdf.CreateOptions = {
printOptions: {
printBackground: true,
},
};
const html = `
<html>
<head>
<style>
.someClass {
width: 100px; height: 100px;
border-radius: 50%;
background: conic-gradient(#655655 40deg, yellowgreen 0);
}
</style>
</head>
<body>
<div class="someClass"></div>
</body>
</html>
`;
const result = await HtmlPdf.create(html, options);
result.toFile('test.pdf');
westy92 commented
If this is still an issue, please respond with a full code example.