p3x-html-pdf 2025.4.119 β 2025.4.124
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 +60 -10
- package/package.json +3 -3
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.124
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -204,9 +204,64 @@ Check out an example output PDF:
|
|
|
204
204
|
|
|
205
205
|
---
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
# Puppeteer vs. p3x-html-pdf: Resource Usage and Features Comparison
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
When deciding between **Puppeteer** and **p3x-html-pdf**, it's essential to understand their differences in resource usage and capabilities.
|
|
210
|
+
|
|
211
|
+
## Technology Difference
|
|
212
|
+
|
|
213
|
+
- **p3x-html-pdf** is built on **wkhtmltopdf**, which uses the WebKit rendering engine. It's lightweight and optimized for HTML-to-PDF tasks.
|
|
214
|
+
- **Puppeteer** launches a full **Chrome/Chromium** instance, consuming more CPU and memory, even in headless mode.
|
|
215
|
+
|
|
216
|
+
## Resource Usage Comparison
|
|
217
|
+
|
|
218
|
+
| Feature | p3x-html-pdf (wkhtmltopdf) | Puppeteer (Chrome/Chromium) |
|
|
219
|
+
|------------------------|---------------------------------------------|------------------------------------------|
|
|
220
|
+
| **Memory Usage** | Low | High |
|
|
221
|
+
| **CPU Usage** | Low | High |
|
|
222
|
+
| **Startup Time** | Fast | Slower due to browser launch |
|
|
223
|
+
| **Dynamic Content** | Limited support for JavaScript | Full support for JavaScript |
|
|
224
|
+
| **Rendering Accuracy** | Basic CSS and HTML support | Pixel-perfect rendering with modern web standards |
|
|
225
|
+
| **Flexibility** | Headers, footers, scripts (older JS versions) | Highly customizable (headers, footers, scripts) |
|
|
226
|
+
| **Scalability** | Suitable for lightweight tasks and servers | Better for advanced use cases and large-scale rendering |
|
|
227
|
+
| **File Size** | Smaller binary for wkhtmltopdf dependency | Puppeteer requires downloading Chromium (~100MB) |
|
|
228
|
+
|
|
229
|
+
## Trade-offs
|
|
230
|
+
|
|
231
|
+
### p3x-html-pdf (wkhtmltopdf)
|
|
232
|
+
- **Pros:**
|
|
233
|
+
- Lightweight and uses fewer resources.
|
|
234
|
+
- Faster startup time.
|
|
235
|
+
- Ideal for static HTML content with minimal JavaScript or CSS.
|
|
236
|
+
|
|
237
|
+
- **Cons:**
|
|
238
|
+
- Limited support for modern web standards and advanced JavaScript.
|
|
239
|
+
- Basic rendering capabilities.
|
|
240
|
+
|
|
241
|
+
### Puppeteer
|
|
242
|
+
- **Pros:**
|
|
243
|
+
- Full support for dynamic content, advanced JavaScript, and modern web standards.
|
|
244
|
+
- Highly customizable headers, footers, and PDF options.
|
|
245
|
+
- Pixel-perfect rendering accuracy.
|
|
246
|
+
|
|
247
|
+
- **Cons:**
|
|
248
|
+
- Consumes more CPU and memory.
|
|
249
|
+
- Slower startup time due to launching a full Chrome/Chromium instance.
|
|
250
|
+
|
|
251
|
+
## When to Use Each
|
|
252
|
+
|
|
253
|
+
### Use **p3x-html-pdf (wkhtmltopdf)**:
|
|
254
|
+
- When your content is **static** or doesnβt rely on modern web technologies.
|
|
255
|
+
- When resource efficiency is a priority (e.g., on resource-constrained servers).
|
|
256
|
+
|
|
257
|
+
### Use **Puppeteer**:
|
|
258
|
+
- When your content is **dynamic** or relies heavily on JavaScript and CSS.
|
|
259
|
+
- When rendering accuracy, modern web technology support, or customization is critical.
|
|
260
|
+
|
|
261
|
+
## Conclusion
|
|
262
|
+
|
|
263
|
+
- **p3x-html-pdf** (wkhtmltopdf) is a better fit for lightweight tasks with simple requirements.
|
|
264
|
+
- **Puppeteer** excels in advanced and dynamic use cases but comes with higher resource costs.
|
|
210
265
|
|
|
211
266
|
---
|
|
212
267
|
|
|
@@ -241,13 +296,8 @@ If you appreciate our work, consider β starring this repository or π° making
|
|
|
241
296
|
|
|
242
297
|
---
|
|
243
298
|
|
|
244
|
-
### π₯οΈ Server Availability
|
|
245
|
-
Our server may occasionally be down, but please be patient. Typically, it will be back online within 15-30 minutes. We appreciate your understanding.
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
299
|
### π About My Domains
|
|
250
|
-
All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.
|
|
300
|
+
All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.eu](https://corifeus.eu), and [corifeus.com](https://corifeus.com), are developed in my spare time. While you may encounter minor errors, the sites are generally stable and fully functional.
|
|
251
301
|
|
|
252
302
|
---
|
|
253
303
|
|
|
@@ -262,7 +312,7 @@ All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.hu](ht
|
|
|
262
312
|
---
|
|
263
313
|
|
|
264
314
|
|
|
265
|
-
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.
|
|
315
|
+
[**P3X-HTML-PDF**](https://corifeus.com/html-pdf) Build v2025.4.124
|
|
266
316
|
|
|
267
317
|
[](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)
|
|
268
318
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p3x-html-pdf",
|
|
3
|
-
"version": "2025.4.
|
|
3
|
+
"version": "2025.4.124",
|
|
4
4
|
"corifeus": {
|
|
5
5
|
"prefix": "p3x-",
|
|
6
6
|
"publish": true,
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://corifeus.com/html-pdf",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"corifeus-builder": "^2025.4.
|
|
42
|
+
"corifeus-builder": "^2025.4.123"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"cheerio": "^1.0.0",
|
|
46
|
-
"corifeus-utils": "^2025.4.
|
|
46
|
+
"corifeus-utils": "^2025.4.117",
|
|
47
47
|
"fs-extra": "^11.3.0",
|
|
48
48
|
"progress": "^2.0.3"
|
|
49
49
|
},
|