n8n-nodes-htmlcsstopdf 3.1.8 → 3.2.0

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
@@ -19,14 +19,18 @@ An n8n community node for creating PDFs from HTML/CSS or URLs, manipulating PDFs
19
19
  - **Output Filename**: Set the resulting PDF filename
20
20
  - **Configurable Timeout**: Increase timeouts for large/slow renders
21
21
  - **PDF Manipulation**
22
- - **Merge PDFs**: Merge 2–15 PDFs from URLs
22
+ - **Merge PDFs**: Merge 2–15 PDFs from URLs or multiple binary PDF inputs
23
23
  - **Split PDF**: Extract specific pages, split each page, or split into chunks
24
24
  - **Compress PDF**: Reduce file size with selectable compression levels
25
+ - **Watermark PDF**: Add text watermark with angle/opacity/font controls
26
+ - **Convert PDF to Image**: Convert selected pages to PNG/JPG/JPEG/WEBP
27
+ - **Convert Image to PDF**: Merge one or multiple images into a PDF
25
28
  - **PDF Security**
26
- - **Lock PDF**: Add password protection (optionally provide input password for already-encrypted PDFs)
27
- - **Unlock PDF**: Remove password protection
29
+ - **Lock PDF**: Add password protection (optionally provide input password for already-encrypted PDFs), via URL or file input
30
+ - **Unlock PDF**: Remove password protection, via URL or file input
28
31
  - **PDF Extraction & Parsing**
29
- - **Parse PDF to JSON**: Extract text/layout/tables/full extraction with page selection
32
+ - **Parse PDF to JSON**: Extract text/layout/tables/full extraction with page selection, via URL or file input
33
+ - **Parse PDF with OCR**: OCR parse scanned PDFs with language/PSM/OEM settings
30
34
 
31
35
  ## Installation
32
36
 
@@ -115,17 +119,21 @@ Generate a PDF from a website URL.
115
119
  ### PDF Manipulation
116
120
 
117
121
  #### Merge PDFs
118
- Merge multiple PDF URLs into one document.
122
+ Merge multiple PDFs into one document.
119
123
 
120
124
  **Parameters:**
121
- - **PDF URLs** (`pdf_urls`, comma-separated; minimum 2, maximum 15)
125
+ - **Input Type** (`merge_input_type`: `url` or `file`)
126
+ - **PDF URLs** (`pdf_urls`, comma-separated; minimum 2, maximum 15; URL mode)
127
+ - **File Binary Property Name (CSV)** (`merge_file_binary_properties`, file mode)
122
128
  - **Output Type** (`merge_output`: `url`, `file`, or `base64`)
123
129
 
124
130
  #### Split PDF
125
131
  Split or extract pages from a PDF.
126
132
 
127
133
  **Parameters:**
128
- - **PDF URL** (`split_url`)
134
+ - **Input Type** (`split_input_type`: `url` or `file`)
135
+ - **PDF URL** (`split_url`, URL mode)
136
+ - **File Binary Property** (`split_file_binary_property`, file mode)
129
137
  - **Split Mode** (`split_mode`)
130
138
  - `pages`: extract a page range/list via **Page Range** (`pages`)
131
139
  - `each`: split each page into its own PDF
@@ -136,18 +144,57 @@ Split or extract pages from a PDF.
136
144
  Compress a PDF to reduce file size.
137
145
 
138
146
  **Parameters:**
139
- - **PDF URL** (`compress_url`, max 10MB)
147
+ - **Input Type** (`compress_input_type`: `url` or `file`)
148
+ - **PDF URL** (`compress_url`, max 10MB, URL mode)
149
+ - **File Binary Property** (`compress_file_binary_property`, file mode)
140
150
  - **Compression Level** (`compression`: `low`, `medium`, `high`, `max`)
141
151
  - **Output Type** (`compress_output`: `url`, `file`, or `base64`)
142
152
  - **Output Filename** (`compress_output_name`, e.g. `compressed.pdf`)
143
153
 
154
+ #### Watermark PDF
155
+ Add text watermark to a PDF.
156
+
157
+ **Parameters:**
158
+ - **Input Type** (`watermark_input_type`: `url` or `file`)
159
+ - **PDF URL** (`watermark_file_url`, URL mode)
160
+ - **File Binary Property** (`watermark_file_binary_property`, file mode)
161
+ - **Output Format** (`watermark_output_format`: `file`, `url`, `base64`, or `both`)
162
+ - **Watermark Text** (`watermark_text`)
163
+ - **Opacity** (`watermark_opacity`)
164
+ - **Angle** (`watermark_angle`)
165
+ - **Font Size** (`watermark_font_size`, optional)
166
+
167
+ #### Convert PDF to Image
168
+ Convert one or more PDF pages to images.
169
+
170
+ **Parameters:**
171
+ - **Input Type** (`convert_pdf_image_input_type`: `url` or `file`)
172
+ - **PDF URL** (`convert_pdf_image_url`, URL mode)
173
+ - **File Binary Property** (`convert_pdf_image_file_binary_property`, file mode)
174
+ - **Page** (`convert_pdf_image_page`, used when `Pages` is empty)
175
+ - **Pages** (`convert_pdf_image_pages`, e.g. `1-3` or `1,3,5`)
176
+ - **Image Format** (`convert_pdf_image_format`: `png`, `jpg`, `jpeg`, `webp`)
177
+ - **DPI** (`convert_pdf_image_dpi`)
178
+ - **Quality** (`convert_pdf_image_quality`)
179
+ - **Output Type** (`convert_pdf_image_output`: `url`, `base64`, `both`, or `file`)
180
+
181
+ #### Convert Image to PDF
182
+ Convert one or multiple image URLs into a PDF.
183
+
184
+ **Parameters:**
185
+ - **Image URLs** (`convert_image_pdf_urls`, comma-separated)
186
+ - **Output Type** (`convert_image_pdf_output`: `url`, `base64`, `both`, or `file`)
187
+ - **Output Filename** (`convert_image_pdf_filename`)
188
+
144
189
  ### PDF Security
145
190
 
146
191
  #### Lock PDF
147
192
  Add password protection to a PDF.
148
193
 
149
194
  **Parameters:**
150
- - **PDF URL** (`lock_url`, max 10MB)
195
+ - **Input Type** (`lock_input_type`: `url` or `file`)
196
+ - **PDF URL** (`lock_url`, max 10MB, URL mode)
197
+ - **File Binary Property** (`lock_file_binary_property`, file mode)
151
198
  - **Password** (`lock_password`)
152
199
  - **Input Password** (`lock_input_password`, optional)
153
200
  - **Output Type** (`lock_output`: `url`, `file`, or `base64`)
@@ -157,7 +204,9 @@ Add password protection to a PDF.
157
204
  Remove password protection from a PDF.
158
205
 
159
206
  **Parameters:**
160
- - **PDF URL** (`unlock_url`, max 10MB)
207
+ - **Input Type** (`unlock_input_type`: `url` or `file`)
208
+ - **PDF URL** (`unlock_url`, max 10MB, URL mode)
209
+ - **File Binary Property** (`unlock_file_binary_property`, file mode)
161
210
  - **Password** (`unlock_password`)
162
211
  - **Output Type** (`unlock_output`: `url`, `file`, or `base64`)
163
212
  - **Output Filename** (`unlock_output_name`, e.g. `unlocked.pdf`)
@@ -168,10 +217,25 @@ Remove password protection from a PDF.
168
217
  Parse a PDF into structured JSON.
169
218
 
170
219
  **Parameters:**
171
- - **PDF URL** (`parse_url`)
220
+ - **Input Type** (`parse_input_type`: `url` or `file`)
221
+ - **PDF URL** (`parse_url`, URL mode)
222
+ - **File Binary Property** (`parse_file_binary_property`, file mode)
172
223
  - **Parse Mode** (`parse_mode`: `text`, `layout`, `tables`, `full`)
173
224
  - **Pages** (`parse_pages`: `all` or ranges like `1-3`)
174
225
 
226
+ #### Parse PDF with OCR
227
+ Parse scanned PDFs using OCR.
228
+
229
+ **Parameters:**
230
+ - **Input Type** (`parse_input_type`: `url` or `file`)
231
+ - **PDF URL** (`parse_url`, URL mode)
232
+ - **File Binary Property** (`parse_file_binary_property`, file mode)
233
+ - **Language** (`lang`, e.g. `eng` or `eng+hin`)
234
+ - **Pages** (`parse_pages`: `all` or ranges like `1-3`)
235
+ - **DPI** (`dpi`)
236
+ - **PSM** (`psm`)
237
+ - **OEM** (`oem`)
238
+
175
239
  ## Usage
176
240
 
177
241
  ### Basic HTML to PDF Conversion
@@ -232,6 +296,7 @@ Parse a PDF into structured JSON.
232
296
  <p>This certifies that <strong>John Doe</strong> has completed the course.</p>
233
297
  <div class="signature">Authorized Signature</div>
234
298
  </div>
299
+ ```
235
300
 
236
301
  ### PDF Manipulation Examples
237
302
 
@@ -240,16 +305,29 @@ Parse a PDF into structured JSON.
240
305
  {
241
306
  "resource": "pdfManipulation",
242
307
  "operation": "mergePdfs",
308
+ "merge_input_type": "url",
243
309
  "pdf_urls": "https://example.com/a.pdf, https://example.com/b.pdf",
244
310
  "merge_output": "url"
245
311
  }
246
312
  ```
247
313
 
314
+ #### Merge PDFs (File input)
315
+ ```json
316
+ {
317
+ "resource": "pdfManipulation",
318
+ "operation": "mergePdfs",
319
+ "merge_input_type": "file",
320
+ "merge_file_binary_properties": "data1,data2",
321
+ "merge_output": "file"
322
+ }
323
+ ```
324
+
248
325
  #### Split PDF (extract pages)
249
326
  ```json
250
327
  {
251
328
  "resource": "pdfManipulation",
252
329
  "operation": "splitPdf",
330
+ "split_input_type": "url",
253
331
  "split_url": "https://example.com/document.pdf",
254
332
  "split_mode": "pages",
255
333
  "pages": "1-3",
@@ -262,6 +340,7 @@ Parse a PDF into structured JSON.
262
340
  {
263
341
  "resource": "pdfManipulation",
264
342
  "operation": "compressPdf",
343
+ "compress_input_type": "url",
265
344
  "compress_url": "https://example.com/document.pdf",
266
345
  "compression": "high",
267
346
  "compress_output": "file",
@@ -269,6 +348,44 @@ Parse a PDF into structured JSON.
269
348
  }
270
349
  ```
271
350
 
351
+ #### Watermark PDF
352
+ ```json
353
+ {
354
+ "resource": "pdfManipulation",
355
+ "operation": "watermarkPdf",
356
+ "watermark_input_type": "url",
357
+ "watermark_file_url": "https://example.com/document.pdf",
358
+ "watermark_output_format": "file",
359
+ "watermark_text": "CONFIDENTIAL",
360
+ "watermark_opacity": 0.15,
361
+ "watermark_angle": 30
362
+ }
363
+ ```
364
+
365
+ #### Convert PDF to Image
366
+ ```json
367
+ {
368
+ "resource": "pdfManipulation",
369
+ "operation": "convertPdfToImage",
370
+ "convert_pdf_image_input_type": "url",
371
+ "convert_pdf_image_url": "https://example.com/document.pdf",
372
+ "convert_pdf_image_pages": "1-3",
373
+ "convert_pdf_image_format": "png",
374
+ "convert_pdf_image_output": "url"
375
+ }
376
+ ```
377
+
378
+ #### Convert Image to PDF
379
+ ```json
380
+ {
381
+ "resource": "pdfManipulation",
382
+ "operation": "convertImageToPdf",
383
+ "convert_image_pdf_urls": "https://example.com/a.png, https://example.com/b.jpg",
384
+ "convert_image_pdf_output": "file",
385
+ "convert_image_pdf_filename": "combined-images.pdf"
386
+ }
387
+ ```
388
+
272
389
  ### PDF Security Examples
273
390
 
274
391
  #### Lock PDF
@@ -276,6 +393,7 @@ Parse a PDF into structured JSON.
276
393
  {
277
394
  "resource": "pdfSecurity",
278
395
  "operation": "lockPdf",
396
+ "lock_input_type": "url",
279
397
  "lock_url": "https://example.com/document.pdf",
280
398
  "lock_password": "your-password",
281
399
  "lock_output": "file",
@@ -288,6 +406,7 @@ Parse a PDF into structured JSON.
288
406
  {
289
407
  "resource": "pdfSecurity",
290
408
  "operation": "unlockPdf",
409
+ "unlock_input_type": "url",
291
410
  "unlock_url": "https://example.com/locked.pdf",
292
411
  "unlock_password": "your-password",
293
412
  "unlock_output": "file",
@@ -302,11 +421,26 @@ Parse a PDF into structured JSON.
302
421
  {
303
422
  "resource": "pdfParsing",
304
423
  "operation": "parsePdf",
424
+ "parse_input_type": "url",
305
425
  "parse_url": "https://example.com/document.pdf",
306
426
  "parse_mode": "full",
307
427
  "parse_pages": "all"
308
428
  }
309
429
  ```
430
+
431
+ #### Parse PDF with OCR
432
+ ```json
433
+ {
434
+ "resource": "pdfParsing",
435
+ "operation": "parsePdfOcr",
436
+ "parse_input_type": "url",
437
+ "parse_url": "https://example.com/scanned.pdf",
438
+ "lang": "eng",
439
+ "parse_pages": "all",
440
+ "dpi": 200,
441
+ "psm": 3,
442
+ "oem": 3
443
+ }
310
444
  ```
311
445
 
312
446
  ## Use Cases