[latex3-commits] [git/LaTeX3-latex3-latex3] setpdfpagesize-alt: Protect against zero paper height/width (3dd54cbf2)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Sep 27 22:10:35 CEST 2022
Repository : https://github.com/latex3/latex3
On branch : setpdfpagesize-alt
Link : https://github.com/latex3/latex3/commit/3dd54cbf28a77c411459a52a16a3df17a5684896
>---------------------------------------------------------------
commit 3dd54cbf28a77c411459a52a16a3df17a5684896
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Sep 27 20:15:14 2022 +0100
Protect against zero paper height/width
>---------------------------------------------------------------
3dd54cbf28a77c411459a52a16a3df17a5684896
l3kernel/l3pdf.dtx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/l3kernel/l3pdf.dtx b/l3kernel/l3pdf.dtx
index 09844bc0e..1ca27db77 100644
--- a/l3kernel/l3pdf.dtx
+++ b/l3kernel/l3pdf.dtx
@@ -522,8 +522,13 @@
{ \dim_compare_p:nNn \stockheight < { 0pt } }
{ \dim_compare_p:nNn \stockwidth < { 0pt } }
{
- \@@_backend_pagesize_set:nn
- \paperwidth \paperheight
+ \bool_lazy_and:nnT
+ { \dim_compare_p:nNn \paperheight > { 0pt } }
+ { \dim_compare_p:nNn \paperwidth > { 0pt } }
+ {
+ \@@_backend_pagesize_set:nn
+ \paperwidth \paperheight
+ }
}
}
}
More information about the latex3-commits
mailing list.