p3x-html-pdf 2025.4.133 → 2025.4.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
- package/src/base.html +1 -5
- package/src/html-template.css +18 -0
- package/src/index.js +1 -1
- package/test/test.js +2 -2
- package/src/ng-html-template.css +0 -103
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
# 📃 Generates PDF from HTML with custom headers and footers with wkhtmltopdf v2025.4.
|
|
9
|
+
# 📃 Generates PDF from HTML with custom headers and footers with wkhtmltopdf v2025.4.135
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -213,9 +213,9 @@ Currently, the ARM64 binary setup is manual. If there is sufficient demand, an a
|
|
|
213
213
|
## 🖼️ Example Output
|
|
214
214
|
|
|
215
215
|
Check out an example output PDF:
|
|
216
|
-
[Example PDF](https://cdn.corifeus.com/git/html-pdf/assets/p3x-html-pdf-
|
|
216
|
+
[Example PDF](https://cdn.corifeus.com/git/html-pdf/assets/p3x-html-pdf-example.pdf).
|
|
217
217
|
|
|
218
|
-

|
|
219
219
|
|
|
220
220
|
---
|
|
221
221
|
|
|
@@ -374,7 +374,7 @@ All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.eu](ht
|
|
|
374
374
|
---
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.
|
|
377
|
+
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.135
|
|
378
378
|
|
|
379
379
|
[](https://www.npmjs.com/package/p3x-html-pdf) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [](https://www.patrikx3.com/en/front/contact) [](https://www.facebook.com/corifeus.software)
|
|
380
380
|
|
package/package.json
CHANGED
package/src/base.html
CHANGED
|
@@ -5,14 +5,10 @@
|
|
|
5
5
|
<base href="${base}">
|
|
6
6
|
<style type="text/css">${css}</style>
|
|
7
7
|
<style type="text/css">
|
|
8
|
-
|
|
9
|
-
ng-html-template-include {
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
8
|
.ng-template-page-break {
|
|
14
9
|
height: 0px;
|
|
15
10
|
border-top-style: none;
|
|
11
|
+
page-break-after: always;
|
|
16
12
|
}
|
|
17
13
|
</style>
|
|
18
14
|
</head>
|
package/src/index.js
CHANGED
|
@@ -46,7 +46,7 @@ const generate = async (options) => {
|
|
|
46
46
|
const baseHtmlFooterHeader = (await fs.readFile(`${__dirname}/header-footer.html`)).toString();
|
|
47
47
|
|
|
48
48
|
options.base = options.base || 'file://' + __dirname;
|
|
49
|
-
options.css = options.css || (await fs.readFile(`${__dirname}/
|
|
49
|
+
options.css = options.css || (await fs.readFile(`${__dirname}/html-template.css`)).toString();
|
|
50
50
|
options.jquery = options.jquery || (await fs.readFile(`${__dirname}/jquery-1.12.4.min.js`)).toString();
|
|
51
51
|
|
|
52
52
|
let html = template(baseHtml)(options)
|
package/test/test.js
CHANGED
|
@@ -6,7 +6,7 @@ const fs = require('fs');
|
|
|
6
6
|
(async () => {
|
|
7
7
|
try {
|
|
8
8
|
// Delete the output file if it already exists
|
|
9
|
-
const outputPath = path.resolve(__dirname, '..', 'assets', 'p3x-html-pdf-
|
|
9
|
+
const outputPath = path.resolve(__dirname, '..', 'assets', 'p3x-html-pdf-example.pdf');
|
|
10
10
|
if (fs.existsSync(outputPath)) {
|
|
11
11
|
fs.unlinkSync(outputPath);
|
|
12
12
|
}
|
|
@@ -83,7 +83,7 @@ const fs = require('fs');
|
|
|
83
83
|
<li>Accepted payment methods include credit card, bank transfer, and PayPal.</li>
|
|
84
84
|
<li>Please ensure that all transactions reference the invoice number provided above.</li>
|
|
85
85
|
</ul>
|
|
86
|
-
<p style="font-size: 14px; color: #555;">If you have any questions, feel free to contact our support team at <a href="mailto:support@
|
|
86
|
+
<p style="font-size: 14px; color: #555;">If you have any questions, feel free to contact our support team at <a href="mailto:support@corifeus.com">support@corifeus.com</a>.</p>
|
|
87
87
|
</div>
|
|
88
88
|
<div class="ng-template-page-break"></div>
|
|
89
89
|
<div>
|
package/src/ng-html-template.css
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
.ng-button-row-left {
|
|
3
|
-
padding-right: 5px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.ng-position-fixed-top-left {
|
|
7
|
-
position: fixed;
|
|
8
|
-
top: 0px;
|
|
9
|
-
left: 0px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ng-position-fixed-top-right {
|
|
13
|
-
position: fixed;
|
|
14
|
-
top: 0px;
|
|
15
|
-
right: 0px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ng-position-fixed-bottom-left {
|
|
19
|
-
position: fixed;
|
|
20
|
-
bottom: 0px;
|
|
21
|
-
left: 0px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ng-position-fixed-bottom-right {
|
|
25
|
-
position: fixed;
|
|
26
|
-
bottom: 0px;
|
|
27
|
-
right: 0px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
template
|
|
32
|
-
.template {
|
|
33
|
-
// > 600
|
|
34
|
-
|
|
35
|
-
// <= 600
|
|
36
|
-
@media screen and (min-width: $screen-small) {
|
|
37
|
-
}
|
|
38
|
-
// <= 960
|
|
39
|
-
@media screen and (min-width: $screen-medium) {
|
|
40
|
-
}
|
|
41
|
-
// <= 1280
|
|
42
|
-
@media screen and (min-width: $screen-large) {
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// <= 1920
|
|
46
|
-
@media screen and (min-width: $screen-huge) {
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
*/
|
|
50
|
-
body {
|
|
51
|
-
font-family: 'Arrial Narrow', sans-serif;
|
|
52
|
-
font-size: 14px;
|
|
53
|
-
margin: 0;
|
|
54
|
-
padding: 0;
|
|
55
|
-
color: black;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
tr {
|
|
59
|
-
page-break-inside: avoid;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
table {
|
|
63
|
-
border-collapse: collapse;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ng-size-a5 {
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.ng-highlight-gray {
|
|
71
|
-
background-color: rgba(128, 128, 128, 0.5);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.divider, .ng-divider {
|
|
76
|
-
height: 20px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.border-horizontal, .ng-border-horizontal {
|
|
80
|
-
border-top: 1px solid #000000;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.ng-border-top-bottom {
|
|
84
|
-
border-top: 1px solid rgba(0, 0, 0, 0.5);
|
|
85
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.border {
|
|
89
|
-
border: 1px solid #000000;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ng-template-page-break {
|
|
93
|
-
height: 1px;
|
|
94
|
-
border-top-style: dotted;
|
|
95
|
-
page-break-after: always;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.ng-header {
|
|
101
|
-
font-weight: bold;
|
|
102
|
-
}
|
|
103
|
-
|