p3x-html-pdf 2025.4.113 → 2025.4.115
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 +6 -4
- package/package.json +2 -2
- package/src/base.html +2 -2
- package/src/index.js +3 -3
- package/src/{ngivr-html-template.css → ng-html-template.css} +12 -12
- package/test-output.pdf +0 -0
- package/work/README.md +34 -0
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.115
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -35,7 +35,7 @@ v22.13.0
|
|
|
35
35
|
[//]: #@corifeus-header:end
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
|
|
40
40
|
[](https://www.npmjs.com/package/p3x-html-pdf)
|
|
41
41
|
[](https://github.com/patrikx3/html-pdf/blob/master/LICENSE)
|
|
@@ -170,7 +170,9 @@ For detailed documentation, visit the [npm page](https://www.npmjs.com/package/p
|
|
|
170
170
|
|
|
171
171
|
---
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
ARM64 Support: If os.arch() === 'arm64', it automatically sets the wkhtmltopdf path to /usr/local/bin/wkhtmltopdf-arm64.
|
|
174
|
+
You can download and place it at:
|
|
175
|
+
https://github.com/houseoftech/wkhtmltopdf-arm64/raw/refs/heads/master/bin/wkhtmltopdf-arm64
|
|
174
176
|
|
|
175
177
|
|
|
176
178
|
[//]: #@corifeus-footer
|
|
@@ -223,7 +225,7 @@ All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.hu](ht
|
|
|
223
225
|
---
|
|
224
226
|
|
|
225
227
|
|
|
226
|
-
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.
|
|
228
|
+
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.115
|
|
227
229
|
|
|
228
230
|
[](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)
|
|
229
231
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p3x-html-pdf",
|
|
3
|
-
"version": "2025.4.
|
|
3
|
+
"version": "2025.4.115",
|
|
4
4
|
"corifeus": {
|
|
5
5
|
"prefix": "p3x-",
|
|
6
6
|
"publish": true,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"cheerio": "^1.0.0",
|
|
46
46
|
"corifeus-utils": "^2025.4.113",
|
|
47
|
-
"fs-extra": "^11.
|
|
47
|
+
"fs-extra": "^11.3.0",
|
|
48
48
|
"progress": "^2.0.3"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
package/src/base.html
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<style type="text/css">${css}</style>
|
|
7
7
|
<style type="text/css">
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
ng-html-template-include {
|
|
10
10
|
background-color: transparent;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
.ng-template-page-break {
|
|
14
14
|
height: 0px;
|
|
15
15
|
border-top-style: none;
|
|
16
16
|
}
|
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}/ng-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)
|
|
@@ -100,8 +100,8 @@ const generate = async (options) => {
|
|
|
100
100
|
|
|
101
101
|
$('.p3x-header').remove();
|
|
102
102
|
$('.p3x-footer').remove();
|
|
103
|
-
//$('
|
|
104
|
-
//$('
|
|
103
|
+
//$('ng-core-pdf-template-include').remove()
|
|
104
|
+
//$('ng-html-template-include').remove()
|
|
105
105
|
html = $.html();
|
|
106
106
|
|
|
107
107
|
html = html.replace(/\${qr}/g, options.settings.qr)
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.
|
|
2
|
+
.ng-button-row-left {
|
|
3
3
|
padding-right: 5px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.ng-position-fixed-top-left {
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 0px;
|
|
9
9
|
left: 0px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
12
|
+
.ng-position-fixed-top-right {
|
|
13
13
|
position: fixed;
|
|
14
14
|
top: 0px;
|
|
15
15
|
right: 0px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.ng-position-fixed-bottom-left {
|
|
19
19
|
position: fixed;
|
|
20
20
|
bottom: 0px;
|
|
21
21
|
left: 0px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
24
|
+
.ng-position-fixed-bottom-right {
|
|
25
25
|
position: fixed;
|
|
26
26
|
bottom: 0px;
|
|
27
27
|
right: 0px;
|
|
@@ -63,24 +63,24 @@ table {
|
|
|
63
63
|
border-collapse: collapse;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.ng-size-a5 {
|
|
67
67
|
font-size: 14px;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
.ng-highlight-gray {
|
|
71
71
|
background-color: rgba(128, 128, 128, 0.5);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
.divider, .
|
|
75
|
+
.divider, .ng-divider {
|
|
76
76
|
height: 20px;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.border-horizontal, .
|
|
79
|
+
.border-horizontal, .ng-border-horizontal {
|
|
80
80
|
border-top: 1px solid #000000;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.
|
|
83
|
+
.ng-border-top-bottom {
|
|
84
84
|
border-top: 1px solid rgba(0, 0, 0, 0.5);
|
|
85
85
|
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
|
86
86
|
}
|
|
@@ -89,7 +89,7 @@ table {
|
|
|
89
89
|
border: 1px solid #000000;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
92
|
+
.ng-template-page-break {
|
|
93
93
|
height: 1px;
|
|
94
94
|
border-top-style: dotted;
|
|
95
95
|
page-break-after: always;
|
|
@@ -97,7 +97,7 @@ table {
|
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
.ng-header {
|
|
101
101
|
font-weight: bold;
|
|
102
102
|
}
|
|
103
103
|
|
package/test-output.pdf
CHANGED
|
Binary file
|
package/work/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[//]: #@corifeus-header
|
|
2
|
+
[AIN](https://img.shields.io/npm/vp/p3x-html-pdf.svg)](https://www.npmjs.com/package/p3x-html-pdf)
|
|
3
|
+
[AIN](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://paypal.me/patrikh3)
|
|
4
|
+
[AIN]{(https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)
|
|
5
|
+
[AIN](https://img.shields.k
|
|
6
|
+
>.badge/Facebook-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
|
|
7
|
+
[AIN]{(https://img.shields.io/uptimerobot/ratio/m780749701-41bcade28c1ea8154eda7cca.svg?ext=")](https://stats.uptimerobot.com/9ggnzcWrw)
|
|
8
|
+
|
|
9
|
+
Heading 13:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<!-- # @corifeus-header:end -->
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/p3x-html-pdf)
|
|
15
|
+
[](https://github.com/patrikx3/html-pdf/blob/master/LICENSE)
|
|
16
|
+
[](https://www.npmjs.com/package/p3x-html-pdf)
|
|
17
|
+
|
|
18
|
+
## “’ Overview
|
|
19
|
+
|
|
20
|
+
**p3x-html-pdf** is a Node.js package that generates PDFs from HTML with custom headers and footers using **wkhtmltopdf**. It is a robust tool for creating professional-grade PDFs with features like:
|
|
21
|
+
|
|
22
|
+
- **\� Snxr4 Dynamic"** Add placeholders for page numbers, dates, and more. -
|
|
23
|
+
* ** ☍ Customizable Layouts**: Configure margins, formatting, orientation, and paper size.-
|
|
24
|
+
* ** ❂ Async/Await Support**: Modern JavaScript compatibility for efficient workflows. --
|
|
25
|
+
* ** ➠ Dynamic Content**: Render data-driven tables and content dynamically.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## “’ Installation
|
|
30
|
+
|
|
31
|
+
Install via yarn:
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
``bash
|