-
Notifications
You must be signed in to change notification settings - Fork 228
Add safePrintableInset parameter for printing. #1950
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11313,6 +11313,13 @@ <h3><dfn>Print Page</dfn></h3> | |
| <li><p>If <var>shrinkToFit</var> is not a <a>Boolean</a> | ||
| return <a>error</a> with <a>error code</a> <a>invalid argument</a>. | ||
|
|
||
| <li><p>Let <var>safePrintableInset</var> be the result of <a>getting a | ||
| property with default</a> named "<code>safePrintableInset</code>" and with | ||
| default <code>0</code> from <var>parameters</var>. | ||
|
|
||
| <li><p>If <var>safePrintableInset</var> is not a <a>Number</a>, or is less than 0, | ||
| return <a>error</a> with <a>error code</a> <a>invalid argument</a>. | ||
|
|
||
| <li><p>Let <var>pageRanges</var> be the result of <a>getting a | ||
| property with default</a> named "<code>pageRanges</code>" from | ||
| <var>parameters</var> with default of an | ||
|
|
@@ -11364,6 +11371,14 @@ <h3><dfn>Print Page</dfn></h3> | |
| page width specified in the content | ||
| </dl> | ||
|
|
||
| <p>The value of <var>safePrintableInset</var> defines the minimum inset along | ||
| each page edge needed to steer clear of the area that the printer is potentially | ||
| incapable of marking reliably. Most printers have a small region along each | ||
| edge of the page sheet which is unprintable, typically due to the printer's | ||
| paper handling mechanism. The document that is being printed may have | ||
| <a href="https://drafts.csswg.org/css-page-3/#page-margin-safety">CSS rules</a> | ||
| to adjust page margins based on this. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should cross-reference https://drafts.csswg.org/css-page-3/#printable-area, should it not? We don't need to redefine what a printable/unprintable area is when we can just cross-reference it. I'd be tempted to say something more along the lines of:
With the current text here I genuinely don't know where to start, because I don't know what this corresponds to, and what I'm meant to be changing as an implementer. But also: shouldn't this just be in the table above? You're changing properties of the "paper" that CSS is targeting, right?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please take another look now. |
||
|
|
||
| <li><p>If <var>pageRanges</var> is not an empty <a>Array</a>, | ||
| Let <var>pages</var> be the result of <a>trying</a> to <a>parse a | ||
| page range</a> with arguments <var>pageRanges</var> and the number of | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.