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

[Bug]: webContents.print({silent:true, landscape:true}) missing header and cut off footer and content #40714

Closed
3 tasks done
Hedwig188 opened this issue Dec 6, 2023 · 4 comments · Fixed by #41811
Closed
3 tasks done
Assignees
Labels
28-x-y bug 🪲 component/printing has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@Hedwig188
Copy link

Preflight Checklist

Electron Version

28.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

Unknown

Expected Behavior

When call webContents.print({silent:true, landscape:true}) with passed in header footer, the header footer should print and not cut off content.

Actual Behavior

When calling webContents.print({silent:true, landscape:true}) with passed in header footer, the header is missing when printing to certain printer drivers. It also cuts off the half footer.

Noticed this when printing to "Kyocera Classic Univeraldriver PCL6"
Kyocera Classic Universaldriver PCL6

and "Canon TS6400 driver"
Canon

Testcase Gist URL

https://gist.github.com/Hedwig188/726673d5ae337419dbbacee3d62c4fcf

Additional Information

See the above TestCase Gist to reproduce the issue. This seems to happen in Electron v24 and v26 as well. Other printers seem to work fine.

@VerteDinde VerteDinde added component/printing status/confirmed A maintainer reproduced the bug or agreed with the feature has-repro-gist Issue can be reproduced with code at https://gist.github.com/ 28-x-y labels Dec 8, 2023
@codebytere
Copy link
Member

@Hedwig188 does this also happen when printing with Google Chrome?

@codebytere codebytere added the blocked/need-info ❌ Cannot proceed without more information label Dec 11, 2023
@Hedwig188
Copy link
Author

Printing from Chrome works fine using the same print settings(landscape, 600 dpi and header footer on). I suspect this is related to issue #39179 that some parameters are not initialize properly with silent printing.
image

@codebytere
Copy link
Member

@Hedwig188 this should be solved in #41811

@codebytere codebytere self-assigned this Apr 10, 2024
@codebytere codebytere added platform/windows and removed blocked/need-info ❌ Cannot proceed without more information labels Apr 10, 2024
@Hedwig188
Copy link
Author

Can we reopen this issue? The header/footer cut off issue is still reproducible with those printer drivers in v28.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
28-x-y bug 🪲 component/printing has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
No open projects
Status: 👍 Does Not Block Stable
Development

Successfully merging a pull request may close this issue.

3 participants