Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
By default the background color of the webpage will be removed when printing. There are post on stackoverflow to overcome this. I am not sure it can apply to all browsers but it seems working on Chrome ( according to the post)
https://stackoverflow.com/questions/14987496/background-color-not-showing-in-print-preview
Hope that helps.
In my reports, most of the tables rows and columns have different colors to differentiate the data. For example, I am only using
<style>
.row1
{
background-color: #D6FFD6;
}
th
{
background-color: #FFF0D1;
}
</style>
Will using image as background appropriate to use in tables?
No issue with css when printing reports with google charts. However, it just does not work with tables.
Hi KoolReport,
I have tried to use background-image instead of background-color. It works on screen.
However, when I click print, the color did not show in table cells, but if i put the same image outside the table, it works.
Could you please help me with this?
Appreciate your help. Thanks.
I do further investigation on this issue and found out that, the color was removed by Bootstrap. You may find the css in bootstrap.css and remove all following:
@media print{
...
}
Remove all above css code, and with option of "background images and colors" from browser, you can print the color background. There is no need to use image anymore.
I have remove all @media print, replaced my code with background-color instead of background-image, clicked on print, tick option "background images and colors" at browser, the color does not appear in print preview. I am not sure whether I removed the right @media print.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo