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 agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
25.x.y-29.x.y
What operating system are you using?
Windows
Operating System Version
Windows 10 1809 and newer
What arch are you using?
x64
Last Known Working Electron version
24.8.8
Expected Behavior
I expect to be able to print webpage content on the whole page at the right size, instead This is what happens if printing non silently or with Chromium/Google Chrome.
Actual Behavior
I get everything printed in the center of the page in approx. a 4x5cm area. As reported thoughtfully in issue #39179.
Testcase Gist URL
No response
Additional Information
I know how to fix it, but I lack C++ and project knowledge for presenting a Pull Request.
The print out get shrunk because, if not specified, silent print, prints at 72 DPI. A better approach would be to query the printer for the actual DPI setting required (see GetDeviceCaps(hdc, LOGPIXELSX) and GetDeviceCaps(hdc, LOGPIXELSY) where hdc = CreateDCW(null, <printerName>, null, devmod) and devmod is retrieved from the printer via DocumentPropertiesW call)
I worked around it via print options object and resolved missing information outside electron. By checking electron code you should have everything in place for resolving the information I'm mentioning.
See #39179 for examples and further details.
Would be nice to have the issue back ported at least on 28.x.y.
Hope it helps.
The text was updated successfully, but these errors were encountered:
conteit
changed the title
[Bug]: Silent print not working on Windows 10
[Bug]: Silent print not working on Windows 10 (with solution strategy)
Dec 19, 2023
conteit
changed the title
[Bug]: Silent print not working on Windows 10 (with solution strategy)
[Bug]: Silent print not working on Windows 10 (+solution strategy)
Dec 19, 2023
Preflight Checklist
Electron Version
25.x.y-29.x.y
What operating system are you using?
Windows
Operating System Version
Windows 10 1809 and newer
What arch are you using?
x64
Last Known Working Electron version
24.8.8
Expected Behavior
I expect to be able to print webpage content on the whole page at the right size, instead This is what happens if printing non silently or with Chromium/Google Chrome.
Actual Behavior
I get everything printed in the center of the page in approx. a 4x5cm area. As reported thoughtfully in issue #39179.
Testcase Gist URL
No response
Additional Information
I know how to fix it, but I lack C++ and project knowledge for presenting a Pull Request.
The print out get shrunk because, if not specified, silent print, prints at 72 DPI. A better approach would be to query the printer for the actual DPI setting required (see
GetDeviceCaps(hdc, LOGPIXELSX)
andGetDeviceCaps(hdc, LOGPIXELSY)
wherehdc = CreateDCW(null, <printerName>, null, devmod)
and devmod is retrieved from the printer viaDocumentPropertiesW
call)I worked around it via print options object and resolved missing information outside electron. By checking electron code you should have everything in place for resolving the information I'm mentioning.
See #39179 for examples and further details.
Would be nice to have the issue back ported at least on 28.x.y.
Hope it helps.
The text was updated successfully, but these errors were encountered: