gotenberg-client 0.0.1 → 0.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 +21 -0
- package/README.md +3 -10
- package/dist/package.json +4 -2
- package/package.json +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zmzlois
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the "Software"), to
|
|
7
|
+
deal in the Software without restriction, including without limitation the
|
|
8
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
9
|
+
sell 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.
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# gotenberg-client
|
|
2
2
|
|
|
3
|
-
Typed, promise-based wrapper for [Gotenberg](https://gotenberg.dev/)
|
|
3
|
+
Typed, promise-based wrapper for [Project Gotenberg](https://gotenberg.dev/).
|
|
4
|
+
|
|
5
|
+
> You will have to deploy your own Gotenberg server to use this package.
|
|
4
6
|
|
|
5
7
|
- Minimal surface: one entrypoint, one initialization model.
|
|
6
8
|
- Strong request typing built from shared interfaces in `src/types.ts`.
|
|
@@ -41,7 +43,6 @@ Typed, promise-based wrapper for [Gotenberg](https://gotenberg.dev/) with a sing
|
|
|
41
43
|
- [Converting to PDF/A](#converting-to-pdfa)
|
|
42
44
|
- [Error Handling](#error-handling)
|
|
43
45
|
- [Development](#development)
|
|
44
|
-
- [CI Publish to npm](#ci-publish-to-npm)
|
|
45
46
|
- [Deploy Your Own Gotenberg Server](#deploy-your-own-gotenberg-server)
|
|
46
47
|
|
|
47
48
|
## Install
|
|
@@ -187,7 +188,6 @@ if (result.ok) {
|
|
|
187
188
|
Gotenberg handles page loading, rendering, and output as PDF, removing browser automation work from your app.
|
|
188
189
|
#### `urlToPdf(input: ConvertUrlInput)`
|
|
189
190
|
|
|
190
|
-
Code: wrapper in [`src/gotenberg.ts`](./src/gotenberg.ts), request method `convertUrl` in [`src/client.ts`](./src/client.ts).
|
|
191
191
|
|
|
192
192
|
```ts
|
|
193
193
|
const result = await gotenberg.urlToPdf({
|
|
@@ -202,8 +202,6 @@ You can generate HTML from templates in your application and need immediate PDF
|
|
|
202
202
|
|
|
203
203
|
#### `htmlToPdf(input: ConvertHtmlInput)`
|
|
204
204
|
|
|
205
|
-
Code: wrapper in [`src/gotenberg.ts`](./src/gotenberg.ts), request method `convertHtml` in [`src/client.ts`](./src/client.ts).
|
|
206
|
-
|
|
207
205
|
```ts
|
|
208
206
|
const result = await gotenberg.htmlToPdf({
|
|
209
207
|
indexHtml: "<html><body>hello</body></html>",
|
|
@@ -292,14 +290,11 @@ const result = await gotenberg.officeToPdf({
|
|
|
292
290
|
|
|
293
291
|
#### `excelToPdf(input: ConvertOfficeInput)`
|
|
294
292
|
|
|
295
|
-
Code: wrapper in [`src/gotenberg.ts`](./src/gotenberg.ts), delegates to `convertOffice` in [`src/client.ts`](./src/client.ts).
|
|
296
293
|
|
|
297
294
|
```ts
|
|
298
295
|
const result = await gotenberg.excelToPdf({ files: [/* ... */] });
|
|
299
296
|
```
|
|
300
297
|
|
|
301
|
-
Use when: your workflow needs domain naming for spreadsheet processing.
|
|
302
|
-
Why: explicit naming improves readability and intent in business code.
|
|
303
298
|
|
|
304
299
|
### Converting Word to PDF
|
|
305
300
|
|
|
@@ -350,8 +345,6 @@ const result = await gotenberg.flattenPdf({
|
|
|
350
345
|
|
|
351
346
|
#### `encryptPdf(input: EncryptPdfInput)`
|
|
352
347
|
|
|
353
|
-
Code: wrapper in [`src/gotenberg.ts`](./src/gotenberg.ts), request method `encryptPdf` in [`src/client.ts`](./src/client.ts).
|
|
354
|
-
|
|
355
348
|
```ts
|
|
356
349
|
const result = await gotenberg.encryptPdf({
|
|
357
350
|
files: [pdf],
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gotenberg-client",
|
|
3
3
|
"description": "TypeScript client for the Gotenberg document conversion API.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gotenberg",
|
|
7
7
|
"typescript",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"pdf",
|
|
10
10
|
"conversion"
|
|
11
11
|
],
|
|
12
|
+
"license": "MIT",
|
|
12
13
|
"module": "dist/index.js",
|
|
13
14
|
"type": "module",
|
|
14
15
|
"private": false,
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
44
|
"dist",
|
|
44
|
-
"README.md"
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
45
47
|
],
|
|
46
48
|
"scripts": {
|
|
47
49
|
"format": "biome check --write .",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gotenberg-client",
|
|
3
3
|
"description": "TypeScript client for the Gotenberg document conversion API.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gotenberg",
|
|
7
7
|
"typescript",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"pdf",
|
|
10
10
|
"conversion"
|
|
11
11
|
],
|
|
12
|
+
"license": "MIT",
|
|
12
13
|
"module": "dist/index.js",
|
|
13
14
|
"type": "module",
|
|
14
15
|
"private": false,
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
44
|
"dist",
|
|
44
|
-
"README.md"
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
45
47
|
],
|
|
46
48
|
"scripts": {
|
|
47
49
|
"format": "biome check --write .",
|