Weasyprint CLI failing to load local image files
I have an HTML page I want to convert to PDF using the Weasyprint CLI. The page references images and CSS files by relative path. When I run the command weasyprint --stylesheet main.css file.html file.pdf
, it generates the PDF but the images are not included and the verbose output shows this error:
How to align a watermark diagonally at the center in WeasyPrint?
I’m using the WeasyPrint library to generate PDFs from HTML and CSS. I want to add a watermark diagonally at the center of each page in the generated PDF. I’ve tried using the following CSS code: