n8n-nodes-pdf-api-hub 4.0.6 → 4.0.8

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 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,46 @@ https://pdfapihub.com/docs
85
104
 
86
105
  Parameters:
87
106
 
88
- - **PDF URL**: Publicly accessible PDF URL
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 Input Type**: `url` or `file`
124
+ - **PDF URL** (default: `https://pdfapihub.com/sample-pdfinvoice-with-image.pdf`) (URL mode)
125
+ - **Binary Property Name**: incoming binary PDF (File mode)
126
+ - **Pages**: page number or `all` (default: `1`, max supported: `8`)
127
+ - **Language**, **DPI**, **PSM**, **OEM**
128
+
129
+ Returns: JSON (OCR text)
130
+
131
+ ### Image OCR Parse
132
+
133
+ - Endpoint: `POST https://pdfapihub.com/api/v1/image/ocr/parse`
134
+ - Node: **Resource** → OCR to Searchable Text (PDF/Image)
135
+ - Operation: **Image OCR Parse**
136
+
137
+ Parameters:
138
+
139
+ - **Image Input Type**: `url`, `base64`, or `file`
140
+ - **Image URL** (default: `https://pdfapihub.com/sample-invoicepage.png`) (URL mode)
141
+ - **Base64 Image** (Base64 mode)
142
+ - **Binary Property Name**: incoming binary image (File mode)
143
+ - **Language**, **PSM**, **OEM**
144
+
145
+ Returns: JSON (OCR text)
146
+
94
147
  ### PDF Merge
95
148
 
96
149
  - Endpoint: `POST https://pdfapihub.com/api/v1/pdf/merge`
@@ -117,7 +170,9 @@ Returns:
117
170
 
118
171
  Parameters:
119
172
 
120
- - **PDF URL**: URL of the PDF to split
173
+ - **Input Type**: `url` or `file`
174
+ - **PDF URL**: URL of the PDF to split (URL mode)
175
+ - **Binary Property Name**: incoming binary PDF (File mode)
121
176
  - **Split Type**:
122
177
  - `pages` (extract specific pages)
123
178
  - `each` (split every page)
@@ -139,7 +194,9 @@ Returns:
139
194
 
140
195
  Parameters:
141
196
 
142
- - **PDF URL**
197
+ - **Input Type**: `url` or `file`
198
+ - **PDF URL** (URL mode)
199
+ - **Binary Property Name** (File mode)
143
200
  - **Compression Level**: `low` / `medium` / `high` / `max`
144
201
  - **Output Type**: `url` / `file` / `base64`
145
202
  - **Output Filename**: used when output is file
@@ -157,7 +214,9 @@ Returns:
157
214
 
158
215
  Parameters:
159
216
 
160
- - **PDF URL**
217
+ - **Input Type**: `url` or `file`
218
+ - **PDF URL** (URL mode)
219
+ - **Binary Property Name** (File mode)
161
220
  - **Password**: password to set
162
221
  - **Input Password**: optional (if the input PDF is already encrypted)
163
222
  - **Output Type**: `url` / `file` / `base64`
@@ -176,7 +235,9 @@ Returns:
176
235
 
177
236
  Parameters:
178
237
 
179
- - **PDF URL**
238
+ - **Input Type**: `url` or `file`
239
+ - **PDF URL** (URL mode)
240
+ - **Binary Property Name** (File mode)
180
241
  - **Password**: password to unlock
181
242
  - **Output Type**: `url` / `file` / `base64`
182
243
  - **Output Filename**
@@ -207,6 +268,35 @@ Returns:
207
268
  - `url`: JSON with a PDF URL
208
269
  - `file`: binary PDF
209
270
 
271
+ ### Image to PDF (PNG/WebP/JPG)
272
+
273
+ - Endpoint: `POST https://pdfapihub.com/api/v1/convert/image/pdf`
274
+ - Node: **Resource** → Image to PDF
275
+ - Operations: **PNG to PDF**, **WebP to PDF**, **JPG to PDF**
276
+
277
+ Parameters:
278
+
279
+ - **Input Type**: `url` / `base64` / `file`
280
+ - URL placeholders:
281
+ - PNG: `https://pdfapihub.com/sample.png`
282
+ - WebP: `https://pdfapihub.com/sample.webp`
283
+ - JPG: `https://pdfapihub.com/sample.jpg`
284
+ - **Output Format**: `url` / `base64` / `both` / `file`
285
+ - **Output Filename**
286
+
287
+ ### PDF to Image (PNG/WebP/JPG)
288
+
289
+ - Endpoint: `POST https://pdfapihub.com/api/v1/convert/pdf/image`
290
+ - Node: **Resource** → PDF to Image
291
+ - Operations: **PDF to PNG**, **PDF to WebP**, **PDF to JPG**
292
+
293
+ Parameters:
294
+
295
+ - **Input Type**: `url` or `file`
296
+ - **PDF URL** (URL mode)
297
+ - **Binary Property Name** (File mode)
298
+ - **Pages**, **DPI**, **Quality**, **Output Format**
299
+
210
300
  ### HTML to PDF
211
301
 
212
302
  - Endpoint: `POST https://pdfapihub.com/api/v1/generatePdf`
@@ -228,6 +318,38 @@ Returns:
228
318
  - `url`: JSON with a PDF URL
229
319
  - `file`: binary PDF
230
320
 
321
+ ### URL to Image
322
+
323
+ - Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
324
+ - Node: **Resource** → Website / HTML to Image
325
+ - Operation: **URL to Image**
326
+
327
+ Returns JSON or binary image (based on output format).
328
+
329
+ ### HTML to Image
330
+
331
+ - Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
332
+ - Node: **Resource** → Website / HTML to Image
333
+ - Operation: **HTML to Image**
334
+
335
+ Returns JSON or binary image (based on output format).
336
+
337
+ ### URL to HTML
338
+
339
+ - Endpoint: `POST https://pdfapihub.com/api/v1/url-to-html`
340
+ - Node: **Resource** → URL to HTML
341
+ - Operation: **Fetch HTML**
342
+
343
+ Defaults include URL `http://example.com/`.
344
+
345
+ ### Watermark (PDF/Image)
346
+
347
+ - Endpoint: `POST https://pdfapihub.com/api/v1/watermark`
348
+ - Node: **Resource** → Watermark PDF
349
+ - Operation: **Add Watermark**
350
+
351
+ Supports URL/base64/file input and file/url/base64/both output.
352
+
231
353
  ## Support
232
354
 
233
355
  - PDF API Hub documentation: https://pdfapihub.com/docs
Binary file