-
Notifications
You must be signed in to change notification settings - Fork 114
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
how to change the viewport size in ruby #26
Comments
Good question @perljuls Unfortunately I haven't added that in just yet. It's available in the puppeteer API on the page object: Interestingly, I was hitting up on the need to have that in place no more than 30 minutes ago! I'll likely look to add it in for the next release |
FYI this has been added in #28 You can configure it either via the global configuration, in the I'll roll a release with this soon |
Thanks :) |
Is it possible to set the viewport size with
This doesn't work because 640 and 480 are converted to strings and puppeteer throws an error "Protocol error (Emulation.setDeviceMetricsOverride): Invalid parameters width: integer value expected; height: integer value expected" |
Suggest create a new issue for this @willkoehler, but yes definitely possible. Something I'd already done for the Line 310 in 7dc5056
You're welcome to create a PR for it, otherwise I can take a look when I get some time. |
// reports_controller.rb
//grover.rb
I tried pdf.setViewPort() but I think it is for page = ..browser something
The text was updated successfully, but these errors were encountered: