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]: pageSize not work when silent print on windows 10 #31705

Open
3 tasks done
sunchanglong opened this issue Nov 4, 2021 · 43 comments
Open
3 tasks done

[Bug]: pageSize not work when silent print on windows 10 #31705

sunchanglong opened this issue Nov 4, 2021 · 43 comments

Comments

@sunchanglong
Copy link

sunchanglong commented Nov 4, 2021

Preflight Checklist

Electron Version

16.0.0-beta.6

What operating system are you using?

Windows

Operating System Version

windows 10

What arch are you using?

x64

Last Known Working Electron version

none

Expected Behavior

pageSize works when silent print.

Actual Behavior

webContents.print({silent:true, pageSize: 'A5'})
pageSize not works when silent print. it always use printer default pageSize.

#29532
#29334
#31489

other print options has been fixed, except pageSize.

Testcase Gist URL

No response

Additional Information

No response

@pushkin-
Copy link

pushkin- commented Nov 4, 2021

header also doesn't work. See comment here

@ckerr ckerr added this to Unsorted Issues in 16-x-y Nov 10, 2021
@clavin clavin moved this from Unsorted Issues to Does Not Block Stable in 16-x-y Nov 10, 2021
@codebytere codebytere self-assigned this Nov 10, 2021
@m4heshd
Copy link

m4heshd commented Nov 18, 2021

Tested on both 15.x and 16.x. I cannot reproduce this. It works perfectly fine for me. I suggest providing a reproducible Gist.

@sunchanglong
Copy link
Author

sunchanglong commented Nov 19, 2021

Test Gist:
https://gist.github.com/sunchanglong/7c307aeb031e823ed8273ae44e861d45

My printer support both A4, A5 papers.

  • Print options pageSize: 'A5'
  • System printer default pageSize 'A4'
  • Expect print with A5 papers. Result in A4 print, don't honor electron print options pageSize.

Print task queue
image

@sunchanglong
Copy link
Author

I have test in chrome with a5 print using the same printer, it works.

@m4heshd
Copy link

m4heshd commented Nov 19, 2021

@sunchanglong I tried your Gist with Adobe PDF and the output dimensions are correct. Can you try the same or with Microsoft Print to PDF? It would narrow the issue down to physical device interfaces.

@sunchanglong
Copy link
Author

@m4heshd I tried to print with Microsoft Print to PDF and the output dimensions are correct too.
When print to physical device, Notice the system print task queue, the print properties is not same with specified in code.

@m4heshd
Copy link

m4heshd commented Nov 22, 2021

Ah. Then this definitely is an issue which needs to be addressed.

@m4heshd
Copy link

m4heshd commented Nov 26, 2021

Just tested this and can confirm. These settings are being completely ignored when printed to non-emulated devices. @codebytere, @nornagon can we get some assistance on this? Printing is such a vital task for a majority of Electron apps. I truly hope this can be addressed soon because since #31489 I've written thousands of lines of code around this whole functionality without the knowledge of this being an issue.

@ghost
Copy link

ghost commented Dec 16, 2021

Hello @codebytere , same issue on Linux.
Also custom page sizes like "62X1" for pos printers for example are not supported.

@m4heshd
Copy link

m4heshd commented Dec 30, 2021

Any update on this issue? It's insanely difficult impossible to replace this functionality with third-party libraries.

@Hedwig188
Copy link

Hedwig188 commented Dec 31, 2021

I think this is related to the print driver(all the ones with the red lines are affected). It doesn't seem like there is any way to workaround the issue currently.
image

@sunchanglong
Copy link
Author

sunchanglong commented Jan 4, 2022

Hedwig188

Did you test this on chrome browser?Chrome seems works right.

@Hedwig188
Copy link

Hedwig188

Did you test this on chrome browser?Chrome seems works right.

Yes, I've also confirmed paper size is correctly being respected in Chrome when printing to those affected printers.

@Hedwig188
Copy link

Kyocera FS-CS3500DN KX driver is also broken.

@sunchanglong
Copy link
Author

hello @codebytere, is there any timeline on this issue? thanks.

@sunchanglong
Copy link
Author

#22066
#22014
#33190
#29532
All above are printing pageSize bugs.
pageSize bug makes printing in electron nearly not work.
@codebytere hopes this would be solved.

@moom-en
Copy link

moom-en commented Jul 8, 2022

Hello, Is it in the plan?

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Nov 28, 2022
@Hedwig188
Copy link

Is there a plan to fix this issue?

@qingyanbaby
Copy link

Is there a plan to fix this issue? @codebytere

@ShaunaGordon
Copy link

electron@24.7.1 respects custom pageSize, but then v25 presents with the bug described in #39179

@WillPoulson
Copy link

Also experiencing the same issue with 25, 24 working perfect

@m4heshd
Copy link

m4heshd commented Aug 16, 2023

Opening a new issue is the only way to get help for this. This issue is tagged with ancient, unsupported versions of Electron. So devs won't pay any attention to these. Try the latest stable releases, create a repro gist if the issue persists, and open a new issue. Silent printing works perfectly fine on Chromium BTW. Worth mentioning that.

@moom-en
Copy link

moom-en commented Aug 31, 2023

This issue has been left over for many years, and if it is consistently marked as Does Not Block Stable, then this issue will never be resolved @codebytere @dsanders11

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@1339240789
Copy link

bump

@ShaunaGordon
Copy link

ShaunaGordon commented Dec 4, 2023

Opening a new issue is the only way to get help for this. This issue is tagged with ancient, unsupported versions of Electron. So devs won't pay any attention to these. Try the latest stable releases, create a repro gist if the issue persists, and open a new issue. Silent printing works perfectly fine on Chromium BTW. Worth mentioning that.

@m4heshd Codebytere has specifically said not to open duplicates of this, fyi. Our only option is to continue to post here to keep it open.

@m4heshd
Copy link

m4heshd commented Dec 4, 2023

@ShaunaGordon You can clearly see that all that happened and the tags were updated AFTER my comment you quoted. Yet this issue from 2021 is still open and is reproducible after more than 10 major releases later. 🤷🏻‍♂️

@ShaunaGordon
Copy link

I'm aware, hence the "fyi" part.

@samknp
Copy link

samknp commented Jan 31, 2024

bump

BIXOLON SRP-350plusII cannot define pageSize with silent : true option.
This is really problem.

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@lwestfall
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
16-x-y
Does Not Block Stable
Status: Unsorted Items
Status: 👀 Unsorted Items
Status: 👍 Does Not Block Stable
Development

No branches or pull requests