I'm still struggling with this problem.
It was really easy to accomplish this with RLM (it only took me 2 hours learning, setting and optimizing the layout). But it seems almost impossible to do this in QWeb! The HTML output is problematic, because everything is so dynamic and anything I tried is not shown in PDF (using wkhtmltopdf).
I tried several things. I changed the "report.style" CSS and added to the "body" the following:
1. Using gradients:
background: -webkit-gradient(left top, right top, color-stop(0%, #ffffff), color-stop(76%, #ffffff), color-stop(77%, #ffffff), color-stop(77%, #ffba00), color-stop(100%, #ffba00));
background: linear-gradient(to right, #ffffff 0%, #ffffff 76%, #ffffff 77%, #ffba00 77%, #ffba00 100%);
I see something in HTML but nothing in PDF. The specification of the width is problematic.
2. Using a background image (full width):
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACbAAAAAQAgMAAACwiCOmAAAACVBMVEUAAAD/ugD///89bnSrAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQffAhoOFwaMpuxoAAAAHWlUWHRDb21tZW50AAAAAABDcmVhdGVkIHdpdGggR0lNUGQuZQcAAABASURBVGje7dKhEQAACAOxLsn+q6BrcLhkhL9PoM0XaTEbZsNsZsNsmM1smA2zYTazYTbMZjbMhtkwm9kwG2Y7LEyZ2OBCemJeAAAAAElFTkSuQmCC');
background-repeat: repeat-y;
background-size: 100% auto;
The colored bar is too wide in HTML and I see nothing at all in PDF.
3. Using a background image (only the colored bar):
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACbAAAAAQAgMAAACwiCOmAAAACVBMVEUAAAD/ugD///89bnSrAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQffAhoOFwaMpuxoAAAAHWlUWHRDb21tZW50AAAAAABDcmVhdGVkIHdpdGggR0lNUGQuZQcAAABASURBVGje7dKhEQAACAOxLsn+q6BrcLhkhL9PoM0XaTEbZsNsZsNsmM1smA2zYTazYTbMZjbMhtkwm9kwG2Y7LEyZ2OBCemJeAAAAAElFTkSuQmCC');
background-repeat: repeat-y;
background-size: 1.3cm auto;
background-position: right top;
In HTML this is the best from the layout, but I do not see anything at all in PDF.
4. Using a complete background image in SVG:
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMTBtbSIgaGVpZ2h0PSIyOTdtbSI+CiA8cGF0aCBzdHlsZT0iZmlsbDpub25lO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxcHg7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46bWl0ZXI7c3Ryb2tlLW9wYWNpdHk6MSIgZD0ibSAwLDEwMi4yNTU5MSA3NDQuMDk0NDksMCIgLz4KIDxyZWN0IHN0eWxlPSJmaWxsOiNmZmJhMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmUiIHdpZHRoPSI0OS42NTIwNDIiIGhlaWdodD0iMTA1Mi4xMzIxIiB4PSI2OTQuMzM5NiIgeT0iMC4xMzgyNDc5MSIgcnk9IjAiIC8+Cjwvc3ZnPgo=);
background-origin:border-box;
background-size: cover;
This SVG has the following content:
<svg xmlns="http://www.w3.org/2000/svg" width="210mm" height="297mm">
<path style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 0,102.25591 744.09449,0" />
<rect style="fill:#ffba00;fill-opacity:1;stroke:none" width="49.652042" height="1052.1321" x="694.3396" y="0.13824791" ry="0" />
</svg>
You can see the line and colored bar in HTMl and it's almost correct, if you set the correct width of the window. In PDF I see nothing at all.
Does anybody have any other ideas? It would be so easy, if the paper format dialog would allow to give a background image for the whole paper (maybe as PNG/SVG/PDF).