n8n-nodes-pdf-api-hub 4.0.5 → 4.0.7
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 +124 -5
- package/dist/images/bannerpdfapihub.png +0 -0
- package/dist/images/bannerpdfapihubold.png +0 -0
- package/dist/nodes/PdfSplitMerge/PdfSplitMerge.node.js +1666 -68
- package/dist/nodes/PdfSplitMerge/PdfSplitMerge.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,11 +5,17 @@
|
|
|
5
5
|
An n8n community node for **PDF API Hub** (Get your api key from [https://pdfapihub.com](https://pdfapihub.com)) that can:
|
|
6
6
|
|
|
7
7
|
- Parse PDFs and extract text/structured data
|
|
8
|
+
- OCR PDFs/images into searchable text
|
|
8
9
|
- Merge and split PDFs
|
|
9
10
|
- Compress PDFs
|
|
10
11
|
- Lock and unlock password-protected PDFs
|
|
12
|
+
- Convert images to PDF (PNG/WebP/JPG)
|
|
13
|
+
- Convert PDFs to images (PNG/WebP/JPG)
|
|
11
14
|
- Convert a website URL to a PDF (screenshot)
|
|
12
15
|
- Convert HTML/CSS to a PDF
|
|
16
|
+
- Convert URL/HTML to image
|
|
17
|
+
- Fetch HTML from URL
|
|
18
|
+
- Watermark PDF/image files
|
|
13
19
|
|
|
14
20
|
## Table of contents
|
|
15
21
|
|
|
@@ -19,13 +25,21 @@ An n8n community node for **PDF API Hub** (Get your api key from [https://pdfapi
|
|
|
19
25
|
- [How outputs work (URL vs File vs Base64)](#how-outputs-work-url-vs-file-vs-base64)
|
|
20
26
|
- [Operations](#operations)
|
|
21
27
|
- [PDF Parse / Extract Text](#pdf-parse--extract-text)
|
|
28
|
+
- [PDF OCR Parse](#pdf-ocr-parse)
|
|
29
|
+
- [Image OCR Parse](#image-ocr-parse)
|
|
22
30
|
- [PDF Merge](#pdf-merge)
|
|
23
31
|
- [PDF Split](#pdf-split)
|
|
24
32
|
- [PDF Compress](#pdf-compress)
|
|
25
33
|
- [PDF Lock](#pdf-lock)
|
|
26
34
|
- [PDF Unlock](#pdf-unlock)
|
|
35
|
+
- [Image to PDF (PNG/WebP/JPG)](#image-to-pdf-pngwebpjpg)
|
|
36
|
+
- [PDF to Image (PNG/WebP/JPG)](#pdf-to-image-pngwebpjpg)
|
|
27
37
|
- [URL to PDF (Website Screenshot)](#url-to-pdf-website-screenshot)
|
|
28
38
|
- [HTML to PDF](#html-to-pdf)
|
|
39
|
+
- [URL to Image](#url-to-image)
|
|
40
|
+
- [HTML to Image](#html-to-image)
|
|
41
|
+
- [URL to HTML](#url-to-html)
|
|
42
|
+
- [Watermark (PDF/Image)](#watermark-pdfimage)
|
|
29
43
|
- [Support](#support)
|
|
30
44
|
|
|
31
45
|
## Install
|
|
@@ -72,6 +86,11 @@ Many operations offer an output format/type:
|
|
|
72
86
|
|
|
73
87
|
Tip: If you choose **File**, you can pass the binary to nodes like **Write Binary File**, **Google Drive**, **S3**, **Email**, etc.
|
|
74
88
|
|
|
89
|
+
URL normalization:
|
|
90
|
+
|
|
91
|
+
- If a URL does not start with `http://` or `https://`, this node auto-adds `https://`.
|
|
92
|
+
- If it already starts with `http://` or `https://`, it is used as-is.
|
|
93
|
+
|
|
75
94
|
## Operations
|
|
76
95
|
|
|
77
96
|
API reference docs:
|
|
@@ -85,12 +104,43 @@ https://pdfapihub.com/docs
|
|
|
85
104
|
|
|
86
105
|
Parameters:
|
|
87
106
|
|
|
88
|
-
- **
|
|
107
|
+
- **Input Type**: `url` or `file`
|
|
108
|
+
- **PDF URL**: Publicly accessible PDF URL (URL mode)
|
|
109
|
+
- **Binary Property Name**: incoming binary PDF (File mode)
|
|
89
110
|
- **Parse Mode**: `text` (default), `layout`, `tables`, `full`
|
|
90
111
|
- **Pages**: `all` or a range like `1-3`
|
|
91
112
|
|
|
92
113
|
Returns: JSON (extracted text/structure)
|
|
93
114
|
|
|
115
|
+
### PDF OCR Parse
|
|
116
|
+
|
|
117
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/pdf/ocr/parse`
|
|
118
|
+
- Node: **Resource** → OCR to Searchable Text (PDF/Image)
|
|
119
|
+
- Operation: **PDF OCR Parse**
|
|
120
|
+
|
|
121
|
+
Parameters:
|
|
122
|
+
|
|
123
|
+
- **PDF URL** (default: `https://pdfapihub.com/sample-pdfinvoice-with-image.pdf`)
|
|
124
|
+
- **Pages**: page number or `all` (default: `1`, max supported: `8`)
|
|
125
|
+
- **Language**, **DPI**, **PSM**, **OEM**
|
|
126
|
+
|
|
127
|
+
Returns: JSON (OCR text)
|
|
128
|
+
|
|
129
|
+
### Image OCR Parse
|
|
130
|
+
|
|
131
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/image/ocr/parse`
|
|
132
|
+
- Node: **Resource** → OCR to Searchable Text (PDF/Image)
|
|
133
|
+
- Operation: **Image OCR Parse**
|
|
134
|
+
|
|
135
|
+
Parameters:
|
|
136
|
+
|
|
137
|
+
- **Image Input Type**: `url` or `base64`
|
|
138
|
+
- **Image URL** (default: `https://pdfapihub.com/sample-invoicepage.png`) (URL mode)
|
|
139
|
+
- **Base64 Image** (Base64 mode)
|
|
140
|
+
- **Language**, **PSM**, **OEM**
|
|
141
|
+
|
|
142
|
+
Returns: JSON (OCR text)
|
|
143
|
+
|
|
94
144
|
### PDF Merge
|
|
95
145
|
|
|
96
146
|
- Endpoint: `POST https://pdfapihub.com/api/v1/pdf/merge`
|
|
@@ -117,7 +167,9 @@ Returns:
|
|
|
117
167
|
|
|
118
168
|
Parameters:
|
|
119
169
|
|
|
120
|
-
- **
|
|
170
|
+
- **Input Type**: `url` or `file`
|
|
171
|
+
- **PDF URL**: URL of the PDF to split (URL mode)
|
|
172
|
+
- **Binary Property Name**: incoming binary PDF (File mode)
|
|
121
173
|
- **Split Type**:
|
|
122
174
|
- `pages` (extract specific pages)
|
|
123
175
|
- `each` (split every page)
|
|
@@ -139,7 +191,9 @@ Returns:
|
|
|
139
191
|
|
|
140
192
|
Parameters:
|
|
141
193
|
|
|
142
|
-
- **
|
|
194
|
+
- **Input Type**: `url` or `file`
|
|
195
|
+
- **PDF URL** (URL mode)
|
|
196
|
+
- **Binary Property Name** (File mode)
|
|
143
197
|
- **Compression Level**: `low` / `medium` / `high` / `max`
|
|
144
198
|
- **Output Type**: `url` / `file` / `base64`
|
|
145
199
|
- **Output Filename**: used when output is file
|
|
@@ -157,7 +211,9 @@ Returns:
|
|
|
157
211
|
|
|
158
212
|
Parameters:
|
|
159
213
|
|
|
160
|
-
- **
|
|
214
|
+
- **Input Type**: `url` or `file`
|
|
215
|
+
- **PDF URL** (URL mode)
|
|
216
|
+
- **Binary Property Name** (File mode)
|
|
161
217
|
- **Password**: password to set
|
|
162
218
|
- **Input Password**: optional (if the input PDF is already encrypted)
|
|
163
219
|
- **Output Type**: `url` / `file` / `base64`
|
|
@@ -176,7 +232,9 @@ Returns:
|
|
|
176
232
|
|
|
177
233
|
Parameters:
|
|
178
234
|
|
|
179
|
-
- **
|
|
235
|
+
- **Input Type**: `url` or `file`
|
|
236
|
+
- **PDF URL** (URL mode)
|
|
237
|
+
- **Binary Property Name** (File mode)
|
|
180
238
|
- **Password**: password to unlock
|
|
181
239
|
- **Output Type**: `url` / `file` / `base64`
|
|
182
240
|
- **Output Filename**
|
|
@@ -207,6 +265,35 @@ Returns:
|
|
|
207
265
|
- `url`: JSON with a PDF URL
|
|
208
266
|
- `file`: binary PDF
|
|
209
267
|
|
|
268
|
+
### Image to PDF (PNG/WebP/JPG)
|
|
269
|
+
|
|
270
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/convert/image/pdf`
|
|
271
|
+
- Node: **Resource** → Image to PDF
|
|
272
|
+
- Operations: **PNG to PDF**, **WebP to PDF**, **JPG to PDF**
|
|
273
|
+
|
|
274
|
+
Parameters:
|
|
275
|
+
|
|
276
|
+
- **Input Type**: `url` / `base64` / `file`
|
|
277
|
+
- URL placeholders:
|
|
278
|
+
- PNG: `https://pdfapihub.com/sample.png`
|
|
279
|
+
- WebP: `https://pdfapihub.com/sample.webp`
|
|
280
|
+
- JPG: `https://pdfapihub.com/sample.jpg`
|
|
281
|
+
- **Output Format**: `url` / `base64` / `both` / `file`
|
|
282
|
+
- **Output Filename**
|
|
283
|
+
|
|
284
|
+
### PDF to Image (PNG/WebP/JPG)
|
|
285
|
+
|
|
286
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/convert/pdf/image`
|
|
287
|
+
- Node: **Resource** → PDF to Image
|
|
288
|
+
- Operations: **PDF to PNG**, **PDF to WebP**, **PDF to JPG**
|
|
289
|
+
|
|
290
|
+
Parameters:
|
|
291
|
+
|
|
292
|
+
- **Input Type**: `url` or `file`
|
|
293
|
+
- **PDF URL** (URL mode)
|
|
294
|
+
- **Binary Property Name** (File mode)
|
|
295
|
+
- **Pages**, **DPI**, **Quality**, **Output Format**
|
|
296
|
+
|
|
210
297
|
### HTML to PDF
|
|
211
298
|
|
|
212
299
|
- Endpoint: `POST https://pdfapihub.com/api/v1/generatePdf`
|
|
@@ -228,6 +315,38 @@ Returns:
|
|
|
228
315
|
- `url`: JSON with a PDF URL
|
|
229
316
|
- `file`: binary PDF
|
|
230
317
|
|
|
318
|
+
### URL to Image
|
|
319
|
+
|
|
320
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
|
|
321
|
+
- Node: **Resource** → Website / HTML to Image
|
|
322
|
+
- Operation: **URL to Image**
|
|
323
|
+
|
|
324
|
+
Returns JSON or binary image (based on output format).
|
|
325
|
+
|
|
326
|
+
### HTML to Image
|
|
327
|
+
|
|
328
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
|
|
329
|
+
- Node: **Resource** → Website / HTML to Image
|
|
330
|
+
- Operation: **HTML to Image**
|
|
331
|
+
|
|
332
|
+
Returns JSON or binary image (based on output format).
|
|
333
|
+
|
|
334
|
+
### URL to HTML
|
|
335
|
+
|
|
336
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/url-to-html`
|
|
337
|
+
- Node: **Resource** → URL to HTML
|
|
338
|
+
- Operation: **Fetch HTML**
|
|
339
|
+
|
|
340
|
+
Defaults include URL `http://example.com/`.
|
|
341
|
+
|
|
342
|
+
### Watermark (PDF/Image)
|
|
343
|
+
|
|
344
|
+
- Endpoint: `POST https://pdfapihub.com/api/v1/watermark`
|
|
345
|
+
- Node: **Resource** → Watermark PDF
|
|
346
|
+
- Operation: **Add Watermark**
|
|
347
|
+
|
|
348
|
+
Supports URL/base64/file input and file/url/base64/both output.
|
|
349
|
+
|
|
231
350
|
## Support
|
|
232
351
|
|
|
233
352
|
- PDF API Hub documentation: https://pdfapihub.com/docs
|
|
Binary file
|
|
Binary file
|