I am building a report using HTML and CSS. I am working on a header that repeats across pages when printed. In order to achieve this, I am using the @page properties and specifically am trying to insert an image into @top-right. See CSS below:
@page {
@top-right {
content: url('/home/resources/logo.jpg');
border-bottom: .75px solid black;
border-collapse: collapse;
width:25%;
border-spacing:0;
}
The problem is that the image is large. If this were an <img>
within the HTML, I would size it like so:
img.logo { height: 25px; width: 100px; }
However, I am not able to do this since the image is brought in via url()
. Does anyone know how to control the size of the image?
For full information, I am using WeasyPrint to convert the HTML/CSS to PDF.