Skip to content

Commit

Permalink
Merge pull request #107 from XuluWarrior/white-margin
Browse files Browse the repository at this point in the history
Use white margins in pdf
  • Loading branch information
XuluWarrior authored Oct 24, 2024
2 parents 1f2a186 + 2d9e111 commit 5a317a5
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions assets/css/styles-1.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/styles-2.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/styles-3.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/styles-4.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/styles-5.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/styles-6.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ ul {
html,
body {
width: 1020px;
background: white;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
Expand Down
1 change: 1 addition & 0 deletions assets/less/default/responsive.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
@media print {
html, body {
width: 1020px;
background: white;
-webkit-print-color-adjust:exact !important;
print-color-adjust:exact !important;
}
Expand Down
11 changes: 1 addition & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,9 @@ module.exports = {
render: render,
pdfRenderOptions: {
mediaType: 'print',
displayHeaderFooter: true,
margin: {
top: '30px',
bottom: '30px'
},
headerTemplate: `
<style>
html {
-webkit-print-color-adjust: exact;
}
</style>
<div style="margin-top: -30px; background: #f5f5f5; width: 100%; height: 2000px"/>
`
}
}
};

0 comments on commit 5a317a5

Please sign in to comment.