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

Print the document WebView The print - > PageSize document is ambiguous #33097

Closed
3 tasks done
JoeABCDEF opened this issue Feb 28, 2022 · 10 comments · Fixed by #34088
Closed
3 tasks done

Print the document WebView The print - > PageSize document is ambiguous #33097

JoeABCDEF opened this issue Feb 28, 2022 · 10 comments · Fixed by #34088
Labels
documentation 📓 enhancement ✨ pr welcome status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@JoeABCDEF
Copy link

Preflight Checklist

Problem Description

image
image

The unit of width and height is not clear. I don't know whether it should be Px, cm or mm

Proposed Solution

hope you can clarify the unit data of what to wear

Alternatives Considered

none

Additional Information

No response

@Hedwig188
Copy link

It should be microns base on the below documentation.
image

@ckerr ckerr added documentation 📓 pr welcome status/confirmed A maintainer reproduced the bug or agreed with the feature good first issue labels Mar 2, 2022
@Aman0307
Copy link

@Shofiya2003
Copy link

This issue requires addition of a unit to the height and width in the documentation.Right? Should it be pixels or microns?

@google539
Copy link

YouTube-Restrict: Strictสำรวจการเข้าใช

@google539
Copy link

ความกว้างในเอกสารประกอบใช่ไหม ควรเป็นพิกเซลหรือไมครอน?

@google539 google539 แสดงความคิดเห็น

@sebastianlacuesta
Copy link

I'm trying to print to a 100x150mm sheet (similar to A6 and 4x6in but not identical). If I use pageSize: { width: 105000, height: 148000 } then I'm able to print but image it's all pixelated. If I don't specify size, printer gets an error and gets freezed. Then I need to turn off the printer and on later to be able to print.

@rajpatelbot
Copy link

Hey can anyone explain a little bit more about this issue. I couldn't understand it properly. Plz explain me.... Thanks

@Anirudh-2628
Copy link

Can you Explain more about your problem?

@chahatjl
Copy link

We can try using all the units like(Px,cm,mm) and then check which is more accurate or more appealing and go for that unit

@mkiki01
Copy link
Contributor

mkiki01 commented May 4, 2022

The documentation for <webview> tag here: webview docs, states that the print() method is the same as the webContents module print() method. The documentation for that is here: webContents docs which states the following: When a custom pageSize is passed, Chromium attempts to validate platform specific minimum values for width_microns and height_microns. Width and height must both be minimum 353 microns but may be higher on some operating systems.

To answer your issue; the unit is microns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📓 enhancement ✨ pr welcome status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.