-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(page): add omitBackground option for page.pdf method #6981
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi d-rowe, thanks for your contribution!
Your changes look good to me but it would be great if you could add a test for them.
I'm not sure how stable the pdf output is so maybe you can try testing it with golden snapshots (take a look at the screenshot tests to see how) and if that doesn't work we can find another way to at least have basic test coverage.
Thanks!
Thanks. Looks like the tests are only setup to compare pngs. Any suggestions for alternative ways to get some basic test coverage? |
Well if that's not currently set up to handle PDFs, I think we can skip it for now. |
Adds
omitBackground
option for Page.pdf to allow for transparent backgrounds. This option is available in the screenshot api, this change unifies this for both.screenshot
and.pdf
.Related issues: #6906 #2545