New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771634 link

Starred by 7 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Page.printToPDF: printBackground not working

Reported by jo...@hazardscout.com, Oct 4 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
Run `printToPDF` on headless chrome with `printBackground` set to true. An example is:

    <span style="background-color:red">Warning</span>

What is the expected behavior?
The background of "Warning" should be red.

What went wrong?
The background is white, not red.

Did this work before? Yes It worked in chrome-stable 59 but not after chrome-beta 60.

Does this work in other browsers? N/A

Chrome version: 61.0.3163.100-1  Channel: stable
OS Version: Ubuntu 16.04
Flash Version:
 
Labels: Needs-Bisect Needs-Triage-M61
Components: Internals>Printing Internals>Headless
Labels: Proj-Headless
As per the original comment, this issue is related to Headless Chrome. 
Hence requesting someone from Internals>Headless team to look into this issue.

Thanks..
Cc: jzfeng@chromium.org
Labels: -Needs-Bisect
Cc: kkaluri@chromium.org
Labels: TE-NeedsTriageHelp
Since TE doesn't able to reproduce the issue, adding the TE-NeedsTriageHelp for further triage.
Labels: Needs-Feedback
Can you elaborate on what "run printToPDF" means exactly?

Here on Linux, with Chrome 62, I ran:

google-chrome-stable --headless --print-to-pdf file:///tmp/foo.html

Where foo.html contains the <span> HTML snippet. The output.pdf has red text background, as expected.
I'm sorry, it was my mistake. It works fine.

I was using an open source library to create the pdf, but the `printBackground` parameter was not getting passed through.

Thank you for looking into it.
Project Member

Comment 8 by sheriffbot@chromium.org, Oct 26 2017

Cc: thestig@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "thestig@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
Glad to hear it.

Sign in to add a comment