Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

Table with background color does not work

Open cedriclajato opened this issue 3 years ago • 10 comments
trafficstars

<script> function awnow(){ printJS({ printable: 'print', type: 'html', targetStyles: ['*'] }); } </script>

cedriclajato avatar Mar 18 '22 09:03 cedriclajato

pring-table

cedriclajato avatar Mar 18 '22 09:03 cedriclajato

you can try , more setting -> options -> second option

wmcat avatar Jun 25 '22 18:06 wmcat

I have the same problem. How did you solve it?

15521260291 avatar Sep 06 '22 16:09 15521260291

I have the same problem. How did you solve it?

修改打印设置 彩色选项不要选择黑白

wmcat avatar Sep 06 '22 16:09 wmcat

好的,谢谢。请问可以配置成默认是彩色选项吗

15521260291 avatar Sep 06 '22 16:09 15521260291

好像设置了一次 下次默认就是彩色的了把 不知道有没有其他方法 你可以查下

wmcat avatar Sep 06 '22 17:09 wmcat

I used the react-to-print package in React instead

ProfNuru avatar Sep 07 '22 22:09 ProfNuru

@crabbly Hi, background-color:red not work on headerStyle、gridHeaderStyle、gridStyle how to solve it ?

TingNLP avatar Sep 20 '22 00:09 TingNLP

@crabbly Hi, background-color:red is not work on headerStyle、gridHeaderStyle、gridStyle how to solve it ?

I find solution. Just need to add -webkit-print-color-adjust: exact;

see the docs according to your browser. https://developer.mozilla.org/en-US/docs/Web/CSS/print-color-adjust

TingNLP avatar Sep 20 '22 02:09 TingNLP

@TingNLP This: -webkit-print-color-adjust: exact; really helps. Thanks! <3

nesic998 avatar Feb 19 '24 21:02 nesic998