Page 2 of 2

Re: Image on report not printed

Posted: Mon Nov 11, 2019 11:24 am
by MarekK
Hi Guys,

It looks like there is a CSS option available to force the browser (Firefox, Chrome) to print background images: https://stackoverflow.com/a/21160150
Could it be added to the standard CSS options?

Thanks,
Marek

Re: Image on report not printed

Posted: Tue Nov 12, 2019 8:36 am
by Lech Kulikowski
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail, for which component do you need background?

Thank you.

Re: Image on report not printed

Posted: Wed Nov 27, 2019 11:28 am
by MarekK
Hi Lech,

I have attached screenshots from our Web application. We use the Report Viewer to display the report and allow a user to print it.
As you can see on the print preview the image from the top left corner is missing. It won't be printed unless you check the option to print 'Background images' which is disabled as a default (it isn't solution for us to inform all users to select that option during the printing process). I have investigate it a little bit and it is caused by the way images are displayed in the viewer: they are not images elements (<img>), but they are set as background image in the CSS.

I have found that adding an extra CSS class to the element resolves that problem:
-webkit-print-color-adjust: exact;

Thanks,
Marek

Re: Image on report not printed

Posted: Thu Nov 28, 2019 10:36 pm
by Lech Kulikowski
Hello,

Thank you for the information.

Re: Image on report not printed

Posted: Thu Feb 27, 2020 3:14 pm
by csrt
MarekK wrote: Wed Nov 27, 2019 11:28 am Hi Lech,

I have attached screenshots from our Web application. We use the Report Viewer to display the report and allow a user to print it.
As you can see on the print preview the image from the top left corner is missing. It won't be printed unless you check the option to print 'Background images' which is disabled as a default (it isn't solution for us to inform all users to select that option during the printing process). I have investigate it a little bit and it is caused by the way images are displayed in the viewer: they are not images elements (<img>), but they are set as background image in the CSS.

I have found that adding an extra CSS class to the element resolves that problem:
-webkit-print-color-adjust: exact;

Thanks,
Marek
Hello MarekK. I am facing the same problem. Can you be more specific about the solution that worked for you?
To what element did you applied the CSS class? And how you did that?

Thank you.