Skip to content

Commit

Permalink
Enforce minimum page size dimensions (#534)
Browse files Browse the repository at this point in the history
This original PR (#522) used invalid syntax for the minimum size.
  • Loading branch information
jrandolf-2 authored Sep 11, 2023
1 parent 3535c86 commit bcf5601
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2827,9 +2827,11 @@ PDF document represented as a Base64-encoded string.
? top: (float .ge 0.0) .default 1.0,
}

; Minimum size is 1pt x 1pt. Conversion follows from
; https://www.w3.org/TR/css3-values/#absolute-lengths
browsingContext.PrintPageParameters = {
? height: (float .ge (2.54 / 72)) .default 27.94,
? width: (float .ge (2.54 / 72)) .default 21.59,
? height: (float .ge 0.0353) .default 27.94,
? width: (float .ge 0.0353) .default 21.59,
}
</pre>
</dd>
Expand Down

0 comments on commit bcf5601

Please sign in to comment.