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 invalid #39634
Comments
Hello @buWenXin. Thanks for reporting this and helping to make Electron better! Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use. Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests. Now adding the
blocked/need-repro
你好@buWenXin。 感谢您报告此事并帮助让 Electron 变得更好! 您是否可以制作一个独立的测试用例,仅使用重现问题所需的代码? 例如,Electron Fiddle 是制作小型测试用例的绝佳工具,并且可以轻松地将测试用例发布到 Electron 维护人员可以使用的要点。 独立的测试用例使修复问题变得更加顺利:它确保每个人都在考虑同一问题,它从方程式中删除了所有不必要的变量,并且还可以为自动回归测试提供基础。 由于这个原因,现在添加了blocked/need-repro标签。 制作测试用例后,请在后续评论中链接到它。 如果上述问题未得到解决,此问题将在 10 天内关闭。 |
我已经制作了测试用例:https://github.com/buWenXin/Electron-test16 |
是不是我的测试用例不够精简? |
这是我使用 Electron Fiddle 制作的示例:https://gist.github.com/9e4d29cb91c41c260bf23aa1a072f431 |
is this a dupe of this issue by chance? |
@codebytere Can you help me check this issue? |
Printing is a very important feature of the client, why is there no one to handle this issue |
Combining with #31705 |
Preflight Checklist
Electron Version
22.3.21
What operating system are you using?
Windows
Operating System Version
Windows 10专业版 1909
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
win.webContents.print({ silent: false, printBackground: true, deviceName: "pdfFactory Pro", margins: { marginType: "none" }, //attribute invalid! pageSize: { width: 50* 1000, height: 30* 1000 }, }
I hope the pageSize set can take effect and output the size I set during printing
And the content should not automatically rotate.
我希望设置的pageSize能够生效,打印的时候能输出我设置的尺寸;
并且内容不要自动旋转。
Actual Behavior
//attribute invalid! pageSize: { width: 50* 1000, height: 30* 1000 },
The custom size set by pageSize does not take effect, whether using a real printer or a virtual printer (pdfFactory Pro), the size set cannot take effect.
And the set content is 50mm wide and 30mm high, but the output content has been rotated, with 50mm high and 30mm wide output
My English is not good and I am using machine translation. I hope you can understand the problem I have described
pageSize设置的自定义尺寸不生效, 无论使用的真实打印机,还是虚拟打印机(pdfFactory Pro),设置的尺寸都是无法生效。
并且是设置的内容是 宽50mm,高30mm,但是输出的内容被旋转了,输出 高50mm,宽30mm
我的英文不好,使用的是机器翻译,希望你们可以看懂我描述的问题
Testcase Gist URL
https://github.com/buWenXin/Electron-test16
Additional Information
No response
The text was updated successfully, but these errors were encountered: