Print HTML table with background colors in CHROMIUM browser

孤人 提交于 2019-12-23 04:33:18

问题


I have a panel in my html page that is to be printed on click of the print button. The print button uses window.print() for this. I have a table in my page which has some background colors to it. The color coding is kinda important to my application while printing.

I added -webkit-print-color-adjust: exact; css to my table style classes and it was working as expected in Chrome browser.

However, in CHROMIUM browser, the text which is in the table appears with a white background in the PDF. Please refer the snapshot below for your reference.

Expected result

Current output

I am really stuck here. :( Please help!! Any help will be highly appreciated.

来源:https://stackoverflow.com/questions/34428821/print-html-table-with-background-colors-in-chromium-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!