I am currently converting a web page to a format that can be easily printed to pdf while maintaining the same appearance. Many print to pdf tools do not allow you to print background images/colors so I am trying to get around that by putting a solid color image under the header elements of a table. Right now it looks something like this:
<img src="/image.png" width="100%" style="margin-bottom:-90px">
<table><th>Header1</th><th>Header2</th>...
This looks as if the header elements have a solid colored background when I view it normally using a browser but when trying to print to a pdf the <th> elements have a blank white background over the image. Is there a way to force these elements to be viewed as transparent with the text against the image? Or maybe there is an easier way to work around the background issue?
Edit:
So my real problem here was that I was trying to make a work around to make the page accessible to as many htmltopdf tools as possible, ultimately this was just not an option as it will always look different in one browser or the other and one printer will force margins while the other won't, etc. My solution to this was i created a simple app in php that printed the page using wkhtmltopdf, which I had to install on my server first. Once that was done the pdf looked good no matter the browser!