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

Please support fitToPageEnabled option in webContents.printToPDF() #20435

Closed
Alecyrus opened this issue Oct 5, 2019 · 1 comment · Fixed by #20436
Closed

Please support fitToPageEnabled option in webContents.printToPDF() #20435

Alecyrus opened this issue Oct 5, 2019 · 1 comment · Fixed by #20436

Comments

@Alecyrus
Copy link
Contributor

Alecyrus commented Oct 5, 2019

Problem Description

Page content alway overflow, I need fitToPage to print the page correctly like in chrome.

Proposed Solution

WebContents.prototype.printToPDF = function (options) {
  const printingSetting = Object.assign({}, defaultPrintingSetting)
  ...
  if (options. fitToPageEnabled) {
    printingSetting. fitToPageEnabled = options. fitToPageEnabled
  }
 ...
@Alecyrus Alecyrus changed the title Please support fitToPageEnabled option in webContent.printToPDF() Please support fitToPageEnabled option in webContents.printToPDF() Oct 5, 2019
@Alecyrus
Copy link
Contributor Author

Alecyrus commented Oct 5, 2019

I have a PR #20436

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

Successfully merging a pull request may close this issue.

2 participants