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

media for pdf #25

Closed
arius28 opened this issue Apr 17, 2020 · 2 comments
Closed

media for pdf #25

arius28 opened this issue Apr 17, 2020 · 2 comments

Comments

@arius28
Copy link

arius28 commented Apr 17, 2020

Hi, I am trying to understand if I can export the pdf with emulatemedia as screen but it seems that this can't be altered because it is hardcoded to always use print? Or am I not using the url varaibles properly?

I tried media, emulateMedia, mediaType & emulateMedia.mediaType none of which gave me any different results.

If I am reading this line

page = await this.createPage(url, { timeout, waitUntil, credentials, emulateMedia: 'print' })

correctly and it is hardcoded is there a chance you might leave it as an option in the URL and if it is not provided then by default use 'print'?

Thank you for taking the time to build and maintain this image!

@zenato
Copy link
Owner

zenato commented Apr 17, 2020

@arius28 I've been added that options.
You can use ?url=https://www.google.com&type=pdf&emulateMedia=screen
Please check again.
Thank you for your proposal.

@arius28
Copy link
Author

arius28 commented Apr 22, 2020

@zenato It works fine now. Thank you!!

@arius28 arius28 closed this as completed Apr 22, 2020
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

2 participants