changeset 1538:8e67f6e8d195

client: add first css to control pdf generation * Using @page css rules to set a fixed DIN A4 page and margins to more precisely control the resulting pdf when using browser printing.
author Bernhard Reiter <bernhard@intevation.de>
date Fri, 07 Dec 2018 17:43:48 +0100
parents c9f5f2c62d06
children a710d79284e4
files client/src/components/map/Maplayer.vue
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/Maplayer.vue	Fri Dec 07 16:56:06 2018 +0100
+++ b/client/src/components/map/Maplayer.vue	Fri Dec 07 17:43:48 2018 +0100
@@ -15,6 +15,14 @@
   height: 100vh;
 }
 
+// the following css part is for browser-printing based pdf generation
+@page {
+  size: A4 landscape;
+  margin: 4mm;
+  // according to https://www.w3.org/TR/css-page-3/#page-size-prop
+  // we shall now have 210 - 2*4 = 202 mm width and 297 - 2*4 = 289 mm height
+}
+
 @media print {
   .mapfull {
     width: 2000px;