From 92859a7aeeaff7c1eb160d6c2bfd02f4a6672eb1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 9 Sep 2022 11:22:46 -0400 Subject: [PATCH] LP#1986725: restore portrait/landscape choice when printing from Angular This patch works around a default setting in Bootstrap 4 that specifies A3 as the paper size for printing. Specifying any paper size like this causes Chrome and Firefox to stop offering the users the option to choose the paper orientation. My testing suggests that specifying A3 as the default paper size also resulted in the printed text using a smaller font size when printing on US paper sizes. Some sort of scaling down from A3 to letter, perhaps. To test ------- [1] Open the Angular Holds Pull List, select a branch that has items to pull, and click the Print Full List button. Observe that the browser print dialog does not offer an option to choose the orientation. [2] As above, but for any Angular grid's Print Full Grid action. [3] Apply the patch and repeat 1 and 2. This time, the browser print dialog should offer the option to select the orientation. Signed-off-by: Galen Charlton Signed-off-by: Mike Rylander --- Open-ILS/src/eg2/src/styles.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/eg2/src/styles.css b/Open-ILS/src/eg2/src/styles.css index cc4006dab8..d5d930e386 100644 --- a/Open-ILS/src/eg2/src/styles.css +++ b/Open-ILS/src/eg2/src/styles.css @@ -207,6 +207,11 @@ h5 {font-size: .95rem} head {display: none} /* just to be safe */ body div:not([id="eg-print-container"]) {display: none} div {display: none} + @page {size: auto} /* work around Bootrap 4's default + of A3; specifying any paper + size stops browsers from letting + the user choose portrait or + landscape. LP#1986725 */ #eg-print-container {display: block} #eg-print-container div {display: block} #eg-print-container pre {border: none} -- 2.11.0