Closed salomonelli closed 7 years ago
Hmm I haven't played around with the PDF generation in depth but my guess is its trying to print without borders and margins - just like Chrome does by default. I bet there's some option in the electron api for this - lmk if you can find it and I'm happy to add it in a PR!
Thanks for the hint! I discovered that box shadows can't be printed in Chrome. The options are to either not print shadows or to add this styling to the element:
.box{
-webkit-print-color-adjust:exact;
-webkit-filter:opacity(1);
}
With this shadows are being printed. Unfortunately the quality gets extremly low. See http://stackoverflow.com/questions/13975198/text-shadow-and-box-shadow-while-printing-chrome
Hi
I got this box:
Screenshotting with png works. But when I generate a pdf with this command:
electroshot localhost:3000/test 2481x3508 --format pdf --filename "test.pdf"
this is the result:
As you can see the boxshadow is not correct. Am I doing something wrong?