-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Implement Page#pdf #5
Conversation
lib/puppeteer/page/pdf_options.rb
Outdated
|
||
# @return [PaperSize] | ||
private def calc_paper_size | ||
paper_width = 8.5 |
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.
[rubocop] reported by reviewdog 🐶
Lint/UselessAssignment: Useless assignment to variable - paper_width. Did you mean paper_height?
lib/puppeteer/page/pdf_options.rb
Outdated
# @return [PaperSize] | ||
private def calc_paper_size | ||
paper_width = 8.5 | ||
paper_height = 11.0 |
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.
[rubocop] reported by reviewdog 🐶
Lint/UselessAssignment: Useless assignment to variable - paper_height. Did you mean paper_width?
91f8612
to
451a800
Compare
Working example is
Original implementation: https://github.com/puppeteer/examples/blob/master/element-to-pdf.js |
path
parameter is mandatry. If not specified, ArgumentError is raised because in most case user would forget to set it :)