Skip to content
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

Add support to test printing pdfs #13853

Open
calixteman opened this issue Aug 3, 2021 · 3 comments
Open

Add support to test printing pdfs #13853

calixteman opened this issue Aug 3, 2021 · 3 comments

Comments

@calixteman
Copy link
Contributor

It's possible with puppeteer to print into a pdf:
https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions

So we could load a pdf, dump it into another pdf (if @media print stuff is ok), then load the dumped one and finally generate a PNG.

@marco-c
Copy link
Contributor

marco-c commented Aug 3, 2021

Once we have this capability, we should write a regression test for #13852.

@marco-c
Copy link
Contributor

marco-c commented Jun 30, 2022

This is pretty important, we've been discovering lots of bugs in "Save to PDF" (see for example https://bugzilla.mozilla.org/show_bug.cgi?id=1777209) and the test coverage in m-c is lacking.

@marco-c
Copy link
Contributor

marco-c commented Jul 7, 2022

As part of this, we shouldn't only compare the rendering, but also ensure the PDF output is not rasterized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants