I just tried to use this library to generate PDFs using HTML templates.
Here is some code:
CSS
.thank-you-background {
height: 20px;
background: linear-gradient(red, yellow);
}
HTML
<div class="thank-you-background">
<p><strong>THANK YOU FOR YOUR BUSINESS!</strong></p>
</div>
I have also tried using background-image: linear-gradient(red, yellow); but that gave an explicit error saying com.openhtmltopdf.css-parse WARNING:: (./#inline_style_1) Value for background-image must be an identifier or a URI at line 76. Skipping declaration..
The HTML renders it correctly but the library does not show the gradient background.