rpg-cards
rpg-cards copied to clipboard
Icons not printing | firefox, chrome | Ubuntu 18.04
Print fails to load icons. Only on chrome when option "background graphics" is ticket the cards print as intended.
This is known and stated in the help.
Browsers dont print images unless you enable the "background graphics" option.
Would changing it to img tags not work?
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!
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).
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.
This is not a big deal, just check the "background graphics" option.