[Koha-patches] [PATCH] Bug 10451 - Firefox prints only first page of table with shrink to fit option

Dobrica Pavlinusic dpavlin at rot13.org
Thu Nov 14 13:22:57 CET 2013


According to Firefox bug tracker, versions up to 21 doesn't print
tables correctly when using shrink to fit option. See:

https://bugzilla.mozilla.org/show_bug.cgi?id=684622

However, even with v21 or newer, we still need to add css to
print media which instruct it not to break table tag to print
all pages of table. This has a side-effect that table starts
always on next page, wasting some space on first printed page
(but only in Firefox since CSS selector is specific to it).
---
 koha-tmpl/intranet-tmpl/prog/en/css/print.css |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/print.css b/koha-tmpl/intranet-tmpl/prog/en/css/print.css
index 239059c..ffd9630 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/print.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/print.css
@@ -97,6 +97,13 @@ table {
 	width : 99%;
 }
 
+ at -moz-document url-prefix() {
+    table {
+        /* tries to fix firefox 21+ shrink-to-fit */
+        page-break-inside: avoid;
+    }
+}
+
 table.list {
 	background-color : #FFFFFF;
 	border : 0;
-- 
1.7.2.5



More information about the Koha-patches mailing list