@pdfkiln/pdfkiln 0.0.1 → 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jamal Tantaoui
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ This license covers pdfkiln's own code. The templates of the test corpus
26
+ under corpus/ are not covered by it: each keeps its own license (LGPL-3.0
27
+ for Odoo, GPL-3.0 for parts of ERPNext, MIT for Sylius...), stated in its
28
+ SOURCE.md and manifest.json. They are test data, never part of the
29
+ packages.
package/README.md CHANGED
@@ -1,5 +1,14 @@
1
- # @pdfkiln/pdfkiln
1
+ # pdfkiln
2
2
 
3
- Coming soon: pdfkiln, a drop-in replacement for wkhtmltopdf, powered by Chromium.
3
+ Drop-in replacement for wkhtmltopdf, powered by Chromium.
4
4
 
5
- This version only reserves the name. The first release is 1.0.2; its source will be on [GitHub](https://github.com/Jamalofski/pdfkiln).
5
+ `npx @pdfkiln/pdfkiln wkhtmltopdf page.html page.pdf`, or `npm install -g @pdfkiln/pdfkiln` for the three commands:
6
+
7
+ - `wkhtmltopdf` and `wkhtmltoimage` accept the command lines of wkhtmltopdf and wkhtmltoimage 0.12.6, with the same options, defaults, messages and exit codes;
8
+ - `pdfkiln` offers its own interface, with modern print defaults (`pdfkiln --help`).
9
+
10
+ The first conversion downloads chrome-headless-shell 156.0.8078.47 (Chrome for Testing, linux64, linux-arm64, mac-arm64, mac-x64, win32, win64), checks its SHA-256, and keeps it in the user's cache: `~/.cache/pdfkiln` (or `$XDG_CACHE_HOME`), `~/Library/Caches/pdfkiln`, `%LOCALAPPDATA%\pdfkiln`. `PDFKILN_CACHE_DIR` changes that folder; `PDFKILN_CHROMIUM` points to a chrome-headless-shell of your own.
11
+
12
+ Chromium's sandbox stays on: run as an unprivileged user. On Ubuntu 23.10 and later, AppArmor restricts the user namespaces it needs; an AppArmor profile for the downloaded binary allows them.
13
+
14
+ pdfkiln is not affiliated with the wkhtmltopdf project. MIT license; Chromium, Node.js and the bundled packages keep theirs (`licenses/`).
package/chromium.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "product": "chrome-headless-shell",
3
+ "channel": "Stable",
4
+ "version": "156.0.8078.47",
5
+ "source": "https://storage.googleapis.com/chrome-for-testing-public",
6
+ "archives": {
7
+ "linux64": {
8
+ "file": "chrome-headless-shell-linux64.zip",
9
+ "size": 125799226,
10
+ "sha256": "0d5acc62c3e213f8c87d3c298d66ffcf9a236d12ea4b9f85318bf85dbc279daa"
11
+ },
12
+ "linux-arm64": {
13
+ "file": "chrome-headless-shell-linux-arm64.zip",
14
+ "size": 125696256,
15
+ "sha256": "955059fa7020d7be85eb503e21339fd4d718f51f5996d3b60633fbf908bda132"
16
+ },
17
+ "mac-arm64": {
18
+ "file": "chrome-headless-shell-mac-arm64.zip",
19
+ "size": 103927850,
20
+ "sha256": "2fd1c09a3e1ebde9e69e6aba92f1dd3f21ad247b55d9bf66e39213ff4205436d"
21
+ },
22
+ "mac-x64": {
23
+ "file": "chrome-headless-shell-mac-x64.zip",
24
+ "size": 109256749,
25
+ "sha256": "5e230044c6ac989597f4a4e301a0a710d257e07d6f7754754da2bf62ea3d272c"
26
+ },
27
+ "win32": {
28
+ "file": "chrome-headless-shell-win32.zip",
29
+ "size": 118998176,
30
+ "sha256": "bbc3841ec1a7c6ac3929e76af69558b143f3f55791f426d20c08d999c0d496ce"
31
+ },
32
+ "win64": {
33
+ "file": "chrome-headless-shell-win64.zip",
34
+ "size": 126051683,
35
+ "sha256": "e0af9b23f8051cca4f37ca49cd425e8055701bfc0383c198d67f8d5cc5884249"
36
+ }
37
+ }
38
+ }