You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am also interested in this feature. IE has a "shrink to fit" setting, it would be nice to have it in Electron print APIs so the apps developer no longer needs to do our own calculation to make the dynamic html fit to the page.
This is unfortunately due to its removal in the relevant codepaths upstream by Chromium. Should they bring it back, so will we - but in the meantime, we will adhere to their options settings.
Preflight Checklist
Problem Description
Electron scales my html content down, to fit into the paper/page size.
I want it to print the page without any scaling.
After some research, i've found the following pull request, which added a new option "fitToPageEnabled":
#20436
But this has been removed again with the following pull request:
#21906
Is there a reason this has been removed again ? Is there some other way to completely disable scaling for printing and pdf generation?
My current code looks like this:
This does scale the page down to fit the page, which i'm trying to avoid.
Proposed Solution
Add a "fitToPageEnabled" option to print and printToPdf
Alternatives Considered
Ignore Printer Paper size setting when an @page css rule is defined ?
Additional Information
Tested with electron 13.2.1 on Ubuntu 20.04
The text was updated successfully, but these errors were encountered: