rpg-cards icon indicating copy to clipboard operation
rpg-cards copied to clipboard

Icons not printing | firefox, chrome | Ubuntu 18.04

Open p-thor opened this issue 6 years ago • 5 comments

Print fails to load icons. Only on chrome when option "background graphics" is ticket the cards print as intended.

p-thor avatar Apr 15 '18 19:04 p-thor

This is known and stated in the help.

Browsers dont print images unless you enable the "background graphics" option.

crobi avatar Apr 16 '18 05:04 crobi

Would changing it to img tags not work?

p-thor avatar Apr 23 '18 16:04 p-thor

Using img tags would solve printing the icons, but it would still not print the card background color.

If you find a solution that works without using the background graphics option, feel free to post a PR!

crobi avatar Apr 24 '18 17:04 crobi

The background color could be simulated using an absolutely-positioned img (generate the image in the browser using HTMLCanvasElement toDataURL or perhaps simpler a svg (with a rect inside it and the background color as fill).

wereHamster avatar Apr 24 '18 17:04 wereHamster

The colored card background has a radial gradient, generating an image for that sounds like a lot of work. Using a SVG could work though.

Note also that there is a branch that generates all icons using true vectorized SVG elements instead of DIV elements with rasterized background images.

crobi avatar Apr 24 '18 18:04 crobi

This is not a big deal, just check the "background graphics" option.

mephitrpg avatar Nov 22 '22 23:11 mephitrpg