repeating-linear-gradient prints at the wrong scale/position, causing a "repeated thin line" binder-paper gradient to draw as a solid-black area when printed
Categories
(Core :: Printing: Output, defect, P3)
Tracking
()
People
(Reporter: ashafer, Unassigned)
References
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
- Create a web page containing a CSS repeating-linear-gradient background
- Print the page with appropriate options selected to include background images (the bug happens with or without background colors included)
See attached test case.
Actual results:
The background printed as solid black.
Expected results:
The repeating linear gradient should be rendered on the printed output the same as it does on screen.
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Thanks for the bug report. I can reproduce, though I had to tweak the testcase a bit before I got solid-color rather than nothing-at-all. (Probably depends on printer DPI or some other characteristic.)
It looks like we're getting the scaling wrong when drawing the gradient (and getting the positioning wrong, too, perhaps as a result of the same issue). I'll post a second testcase with wider stripes.
Worth noting, too:
(1) Print Preview is unaffected (on Windows/Linux, where we have built-in previewing UI. On Mac, I assume print-preview is affected, since that really does a print-to-PDF)
(2) When testing this, you need to find the "Options" area of the print dialog, and tick the checkbox for "print background images". This checkbox is un-checked by default, and you need to check it to get the gradient to even attempt to print.
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Hmm, one further confounding issue: different PDF viewers seem to disagree about how to render my printout of testcase 2.
- Safari and Edge both render it "correctly" (6 solid stripes, alternating lime/blue).
- Chrome's built-in PDF viewer renders it nearly-correctly, but with a thin blue stripe at the top.
- Firefox's built-in PDF viewer, PDF.js (disabled by default but toggleable in preferences) renders it as a single mostly-lime gradient, with hints of blue at the bottom.
- My native PDF viewer "Evince" renders it as 3 different-height solid stripes (lime, blue, lime).
So, there may be some PDF-viewer inconsistencies involved here as well. Having said that, all the viewers I've tested seem to agree on rendering Alex's printout as a solid black area (no stripes), so there is something that Firefox itself is definitely doing wrong there.
Comment 7•7 years ago
|
||
I filed https://github.com/mozilla/pdf.js/issues/10572 on the PDF.js misrendering of my printout, BTW.
Updated•3 years ago
|
Updated•8 months ago
|
Description
•