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
Image on report not printed
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: Image on report not printed
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.
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
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
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
- Attachments
-
- ReportViewer.png (108.35 KiB) Viewed 2077 times
-
- PrintSettings.png (123.89 KiB) Viewed 2077 times
-
- Posts: 6358
- Joined: Tue Mar 20, 2018 5:34 am
Re: Image on report not printed
Hello,
Thank you for the information.
Thank you for the information.
Re: Image on report not printed
Hello MarekK. I am facing the same problem. Can you be more specific about the solution that worked for you?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
To what element did you applied the CSS class? And how you did that?
Thank you.