Print Page-Break Avoid Rules
Conditional print-fragmentation fit screen for explicit break-inside avoidance; oversized content may require breaking, not guarantee printer pagination. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.
Description
Avoiding an internal page break depends on whether content can fit on a page.
Avoiding an internal page break depends on whether content can fit on a page.1
A size screen cannot resolve a complete browser pagination algorithm. Use Print Page-Break Avoid Rules to evaluate the supplied inputs under the specific model below.
When to use Print Page-Break Avoid Rules
Use Print Page-Break Avoid Rules to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
How to use Print Page-Break Avoid Rules and understand its results
- Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
- Enter Observed block height px, Remaining page height px, Full page height px, Avoid inside requested using the field table and validation rules below, then run the tool.
- Read Avoid can fit on fresh page, Conditional move to next page and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| observedBlockHeightPx | Observed block height px | number | Required; constraints below |
| remainingPageHeightPx | Remaining page height px | number | Required; constraints below |
| fullPageHeightPx | Full page height px | number | Required; constraints below |
| avoidInsideRequested | Avoid inside requested | boolean | Required; constraints below |
Enter positive full-page height, nonnegative remaining-page height no larger than a page, nonnegative block height and an avoid-break boolean. A block fits a fresh page when its height is at most page height. Move it only when avoidance is requested, it fits a fresh page and it is larger than the remaining space. Equality stays on the current page; fragmentation rules beyond this local decision are not simulated.
fitsFresh = block≤page; move = avoid and fitsFresh and block>remaining Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| avoidCanFitOnFreshPage | Avoid can fit on fresh page | boolean |
| conditionalMoveToNextPage | Conditional move to next page | boolean |
{
"input": {
"observedBlockHeightPx": 120,
"remainingPageHeightPx": 100,
"fullPageHeightPx": 200,
"avoidInsideRequested": true
},
"output": {
"avoidCanFitOnFreshPage": true,
"conditionalMoveToNextPage": true
}
} Limitations and assumptions
A size screen cannot resolve a complete browser pagination algorithm. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use forced-colors Adjustments Lookup for a related task: Forced-color mode can substitute a user agent's selected colors.
Use all:unset Reset Behavior Lookup for a related task: All unset applies inheritance or initial-value behavior with defined exclusions.
References
-
Print Page-Break Avoid Rules — tool.io
Similar or alternative tools
- forced-colors Adjustments Lookup
Forced-color mode can substitute a user agent's selected colors.
- all:unset Reset Behavior Lookup
All unset applies inheritance or initial-value behavior with defined exclusions.