From c3f69a3f608f9681148db26ed1673b28aa5e30b0 Mon Sep 17 00:00:00 2001 From: yogesh_gohil Date: Fri, 15 Nov 2019 18:00:42 +0530 Subject: [PATCH] fix invoice and estimate page-break margin --- .../views/app/pdf/estimate/estimate1.blade.php | 18 +++++++++++++----- .../views/app/pdf/estimate/estimate2.blade.php | 13 ++++++++----- .../views/app/pdf/estimate/estimate3.blade.php | 17 ++++++++++------- .../views/app/pdf/invoice/invoice1.blade.php | 8 +++++++- .../views/app/pdf/invoice/invoice2.blade.php | 12 +++++++----- .../views/app/pdf/invoice/invoice3.blade.php | 16 +++++++++------- 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 716905dc..2be69f21 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -35,7 +35,7 @@ width: 100%; height: 90px; left: 0px; - top: 0px; + top: -50px; } .header-logo { @@ -69,10 +69,15 @@ color: rgba(0, 0, 0, 0.5); } + @page { + margin-top: 60px !important; + } + .wrapper { display: block; - padding-top: 60px; - padding-bottom: 60px; + margin-top: 0px; + padding-top: 16px; + padding-bottom: 20px; } .address { @@ -343,6 +348,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { @@ -375,8 +381,8 @@ +
-
@@ -413,7 +419,9 @@
- @include('app.pdf.estimate.partials.table') +
+ @include('app.pdf.estimate.partials.table') +
@include('app.pdf.estimate.partials.notes')
diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index e0098e38..895cb3ad 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -23,15 +23,17 @@ display:inline-block; width:30%; } + + @page { + margin-top: 60px !important; + } .header-table { background: #817AE3; position: absolute; width: 100%; height: 141px; left: 0px; - top: 0px; - - + top: -60px; } .header-logo { position: absolute; @@ -73,8 +75,8 @@ .wrapper { display: block; - padding-top: 110px; - padding-bottom: 60px; + margin-top: 60px; + padding-bottom: 20px; } .address { @@ -371,6 +373,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index fddcba17..329bef9c 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -19,7 +19,7 @@ hr { color:rgba(0, 0, 0, 0.2); position: absolute; - top: 140px; + top: 80px; left: 0px; right: -70px; width: 100%; @@ -37,9 +37,7 @@ width: 100%; height: 150px; left: 0px; - top: 0px; - - + top: -60px; } .header-logo { position: absolute; @@ -77,10 +75,14 @@ color: rgba(0, 0, 0, 0.5); } + @page { + margin-top: 60px !important; + } + .wrapper { display: block; - padding-top: 110px; - padding-bottom: 60px; + padding-top: 50px; + padding-bottom: 20px; } .address { @@ -379,6 +381,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { @@ -416,7 +419,7 @@ -
+
diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index 635a5c0e..4b984bfb 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -70,10 +70,15 @@ color: rgba(0, 0, 0, 0.5); } + @page { + margin-top: 60px !important; + } + .wrapper { display: block; + margin-top: 0px; padding-top: 16px; - padding-bottom: 60px; + padding-bottom: 20px; } .address { @@ -350,6 +355,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index f7784c61..5f317bdc 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -23,15 +23,16 @@ display:inline-block; width:30%; } + @page { + margin-top: 60px !important; + } .header-table { background: #817AE3; position: absolute; width: 100%; height: 141px; left: 0px; - top: 0px; - - + top: -60px; } .header-logo { position: absolute; @@ -73,8 +74,8 @@ .wrapper { display: block; - padding-top: 110px; - padding-bottom: 60px; + margin-top: 60px; + padding-bottom: 20px; } .address { @@ -381,6 +382,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index cc079eb0..7c75efc1 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -19,7 +19,7 @@ hr { color:rgba(0, 0, 0, 0.2); position: absolute; - top: 140px; + top: 80px; left: 0px; right: -70px; width: 100%; @@ -37,9 +37,7 @@ width: 100%; height: 150px; left: 0px; - top: 0px; - - + top: -60px; } .header-logo { position: absolute; @@ -77,10 +75,13 @@ color: rgba(0, 0, 0, 0.5); } + @page { + margin-top: 60px !important; + } .wrapper { display: block; - padding-top: 110px; - padding-bottom: 60px; + padding-top: 50px; + padding-bottom: 20px; } .address { @@ -390,6 +391,7 @@ margin-left: 30px; width: 442px; text-align: left; + page-break-inside: avoid; } .notes-label { @@ -427,7 +429,7 @@
-
+