I am using the wkhtmltopdf
on my amazon ubuntu instance to generate an invoice's PDF. The page is PHP. Everything is working fine except the background color of the html div tags. The border color is working fine. Is there any setting in wkhtmltopdf
to enable printing background color of the div tag?
I have tried bgcolor, css and inline style, also I have checked converting the page in Table structure but none of these helped.
I had this issue as well, and the css was right in the same HTML file. The trick for me ended up being the somewhat-mysterious "!important" at the end of the background-color tag like so:
background-color: #f2f4f7 !important;