n8n-nodes-pdf-api-hub 4.0.17 → 4.0.18

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.
Files changed (75) hide show
  1. package/README.md +216 -302
  2. package/dist/nodes/PdfSplitMerge/PdfSplitMerge.node.js +6 -3389
  3. package/dist/nodes/PdfSplitMerge/PdfSplitMerge.node.js.map +1 -1
  4. package/dist/nodes/PdfSplitMerge/actions/addWatermark.d.ts +3 -0
  5. package/dist/nodes/PdfSplitMerge/actions/addWatermark.js +244 -0
  6. package/dist/nodes/PdfSplitMerge/actions/addWatermark.js.map +1 -0
  7. package/dist/nodes/PdfSplitMerge/actions/compressPdf.d.ts +3 -0
  8. package/dist/nodes/PdfSplitMerge/actions/compressPdf.js +119 -0
  9. package/dist/nodes/PdfSplitMerge/actions/compressPdf.js.map +1 -0
  10. package/dist/nodes/PdfSplitMerge/actions/documentSimilarity.d.ts +3 -0
  11. package/dist/nodes/PdfSplitMerge/actions/documentSimilarity.js +169 -0
  12. package/dist/nodes/PdfSplitMerge/actions/documentSimilarity.js.map +1 -0
  13. package/dist/nodes/PdfSplitMerge/actions/docxToPdf.d.ts +3 -0
  14. package/dist/nodes/PdfSplitMerge/actions/docxToPdf.js +186 -0
  15. package/dist/nodes/PdfSplitMerge/actions/docxToPdf.js.map +1 -0
  16. package/dist/nodes/PdfSplitMerge/actions/fetchHtml.d.ts +3 -0
  17. package/dist/nodes/PdfSplitMerge/actions/fetchHtml.js +207 -0
  18. package/dist/nodes/PdfSplitMerge/actions/fetchHtml.js.map +1 -0
  19. package/dist/nodes/PdfSplitMerge/actions/fileManagement.d.ts +3 -0
  20. package/dist/nodes/PdfSplitMerge/actions/fileManagement.js +106 -0
  21. package/dist/nodes/PdfSplitMerge/actions/fileManagement.js.map +1 -0
  22. package/dist/nodes/PdfSplitMerge/actions/generateImage.d.ts +3 -0
  23. package/dist/nodes/PdfSplitMerge/actions/generateImage.js +316 -0
  24. package/dist/nodes/PdfSplitMerge/actions/generateImage.js.map +1 -0
  25. package/dist/nodes/PdfSplitMerge/actions/generatePdf.d.ts +3 -0
  26. package/dist/nodes/PdfSplitMerge/actions/generatePdf.js +432 -0
  27. package/dist/nodes/PdfSplitMerge/actions/generatePdf.js.map +1 -0
  28. package/dist/nodes/PdfSplitMerge/actions/imageOcrParse.d.ts +3 -0
  29. package/dist/nodes/PdfSplitMerge/actions/imageOcrParse.js +193 -0
  30. package/dist/nodes/PdfSplitMerge/actions/imageOcrParse.js.map +1 -0
  31. package/dist/nodes/PdfSplitMerge/actions/imageToPdf.d.ts +3 -0
  32. package/dist/nodes/PdfSplitMerge/actions/imageToPdf.js +325 -0
  33. package/dist/nodes/PdfSplitMerge/actions/imageToPdf.js.map +1 -0
  34. package/dist/nodes/PdfSplitMerge/actions/index.d.ts +3 -0
  35. package/dist/nodes/PdfSplitMerge/actions/index.js +144 -0
  36. package/dist/nodes/PdfSplitMerge/actions/index.js.map +1 -0
  37. package/dist/nodes/PdfSplitMerge/actions/lockPdf.d.ts +3 -0
  38. package/dist/nodes/PdfSplitMerge/actions/lockPdf.js +244 -0
  39. package/dist/nodes/PdfSplitMerge/actions/lockPdf.js.map +1 -0
  40. package/dist/nodes/PdfSplitMerge/actions/mergePdf.d.ts +3 -0
  41. package/dist/nodes/PdfSplitMerge/actions/mergePdf.js +233 -0
  42. package/dist/nodes/PdfSplitMerge/actions/mergePdf.js.map +1 -0
  43. package/dist/nodes/PdfSplitMerge/actions/parsePdf.d.ts +3 -0
  44. package/dist/nodes/PdfSplitMerge/actions/parsePdf.js +103 -0
  45. package/dist/nodes/PdfSplitMerge/actions/parsePdf.js.map +1 -0
  46. package/dist/nodes/PdfSplitMerge/actions/pdfOcrParse.d.ts +3 -0
  47. package/dist/nodes/PdfSplitMerge/actions/pdfOcrParse.js +202 -0
  48. package/dist/nodes/PdfSplitMerge/actions/pdfOcrParse.js.map +1 -0
  49. package/dist/nodes/PdfSplitMerge/actions/pdfToDocx.d.ts +3 -0
  50. package/dist/nodes/PdfSplitMerge/actions/pdfToDocx.js +171 -0
  51. package/dist/nodes/PdfSplitMerge/actions/pdfToDocx.js.map +1 -0
  52. package/dist/nodes/PdfSplitMerge/actions/pdfToFormat.d.ts +3 -0
  53. package/dist/nodes/PdfSplitMerge/actions/pdfToFormat.js +145 -0
  54. package/dist/nodes/PdfSplitMerge/actions/pdfToFormat.js.map +1 -0
  55. package/dist/nodes/PdfSplitMerge/actions/pdfToImage.d.ts +3 -0
  56. package/dist/nodes/PdfSplitMerge/actions/pdfToImage.js +224 -0
  57. package/dist/nodes/PdfSplitMerge/actions/pdfToImage.js.map +1 -0
  58. package/dist/nodes/PdfSplitMerge/actions/signPdf.d.ts +3 -0
  59. package/dist/nodes/PdfSplitMerge/actions/signPdf.js +286 -0
  60. package/dist/nodes/PdfSplitMerge/actions/signPdf.js.map +1 -0
  61. package/dist/nodes/PdfSplitMerge/actions/splitPdf.d.ts +3 -0
  62. package/dist/nodes/PdfSplitMerge/actions/splitPdf.js +175 -0
  63. package/dist/nodes/PdfSplitMerge/actions/splitPdf.js.map +1 -0
  64. package/dist/nodes/PdfSplitMerge/actions/unlockPdf.d.ts +3 -0
  65. package/dist/nodes/PdfSplitMerge/actions/unlockPdf.js +115 -0
  66. package/dist/nodes/PdfSplitMerge/actions/unlockPdf.js.map +1 -0
  67. package/dist/nodes/PdfSplitMerge/descriptions.d.ts +3 -0
  68. package/dist/nodes/PdfSplitMerge/descriptions.js +479 -0
  69. package/dist/nodes/PdfSplitMerge/descriptions.js.map +1 -0
  70. package/dist/nodes/PdfSplitMerge/helpers.d.ts +20 -0
  71. package/dist/nodes/PdfSplitMerge/helpers.js +152 -0
  72. package/dist/nodes/PdfSplitMerge/helpers.js.map +1 -0
  73. package/dist/package.json +42 -7
  74. package/dist/tsconfig.tsbuildinfo +1 -1
  75. package/package.json +42 -7
package/README.md CHANGED
@@ -2,395 +2,309 @@
2
2
 
3
3
  # n8n-nodes-pdf-api-hub
4
4
 
5
- An n8n community node for **PDF API Hub** (Get your api key from [https://pdfapihub.com](https://pdfapihub.com)) that can:
6
-
7
- - Parse PDFs and extract text/structured data
8
- - OCR PDFs/images into searchable text
9
- - Merge and split PDFs
10
- - Compress PDFs
11
- - Lock and unlock password-protected PDFs
12
- - Convert images to PDF (PNG/WebP/JPG)
13
- - Convert PDFs to images (PNG/WebP/JPG)
14
- - Convert Office-like documents to PDF (DOCX/DOC/PPTX/XLSX/etc.)
15
- - Convert PDFs to DOCX
16
- - Convert a website URL to a PDF (screenshot)
17
- - Convert HTML/CSS to a PDF
18
- - Convert URL/HTML to image
19
- - Fetch HTML from URL
20
- - Watermark PDF/image files
21
-
22
- ## Table of contents
23
-
24
- - [Install](#install)
25
- - [Get your API key (PDF API Hub)](#get-your-api-key-pdf-api-hub)
26
- - [Credentials setup (n8n)](#credentials-setup-n8n)
27
- - [How outputs work (URL vs File vs Base64)](#how-outputs-work-url-vs-file-vs-base64)
28
- - [Operations](#operations)
29
- - [PDF Parse / Extract Text](#pdf-parse--extract-text)
30
- - [PDF OCR Parse](#pdf-ocr-parse)
31
- - [Image OCR Parse](#image-ocr-parse)
32
- - [PDF Merge](#pdf-merge)
33
- - [PDF Split](#pdf-split)
34
- - [PDF Compress](#pdf-compress)
35
- - [PDF Lock](#pdf-lock)
36
- - [PDF Unlock](#pdf-unlock)
37
- - [Image to PDF (PNG/WebP/JPG)](#image-to-pdf-pngwebpjpg)
38
- - [Document to PDF (DOCX/DOC/PPTX/XLSX/etc.)](#document-to-pdf-docxdocpptxxlsxetc)
39
- - [PDF to DOCX](#pdf-to-docx)
40
- - [PDF to Image (PNG/WebP/JPG)](#pdf-to-image-pngwebpjpg)
41
- - [URL to PDF (Website Screenshot)](#url-to-pdf-website-screenshot)
42
- - [HTML to PDF](#html-to-pdf)
43
- - [URL to Image](#url-to-image)
44
- - [HTML to Image](#html-to-image)
45
- - [URL to HTML](#url-to-html)
46
- - [Watermark (PDF/Image)](#watermark-pdfimage)
47
- - [Support](#support)
48
-
49
- ## Install
50
-
51
- Follow the official n8n community node install docs:
52
- https://docs.n8n.io/integrations/community-nodes/installation/
53
-
54
- In n8n:
55
-
56
- 1. Go to **Settings → Community Nodes**
57
- 2. Click **Install a community node**
58
- 3. Enter: `n8n-nodes-pdf-api-hub`
59
- 4. Click **Install**
60
-
61
- ## Get your API key (PDF API Hub)
62
-
63
- 1. Go to https://pdfapihub.com
64
- 2. Sign up / log in
65
- 3. Open your dashboard and find the **API Key / API Keys** section
66
- 4. Create/copy your API key
67
-
68
- If the UI changes, use the official docs as the source of truth:
69
- https://pdfapihub.com/docs
70
-
71
- ## Credentials setup (n8n)
72
-
73
- 1. In n8n, go to **Credentials**
74
- 2. Create a credential: **PDF API Hub API**
75
- 3. Paste your API key
76
- 4. Save
77
-
78
- This node authenticates by sending:
79
-
80
- - Header: `CLIENT-API-KEY: <your-key>`
81
- - Requests are made against: `https://pdfapihub.com/api/v1`
82
-
83
- ## How outputs work (URL vs File vs Base64)
5
+ > **The most powerful PDF toolkit for n8n** 30+ operations, one node.
84
6
 
85
- Many operations offer an output format/type:
7
+ Turn any webpage into a PDF, sign documents, extract tables to Excel, OCR scanned pages, merge/split/compress PDFs, and much more — all inside your n8n workflows.
86
8
 
87
- - **URL**: the API returns a URL in the JSON response
88
- - **File**: the node downloads the generated PDF/ZIP and returns it as **binary data** in n8n (`binary.data`)
89
- - **Base64**: the API returns base64 in the JSON response
9
+ 🔑 **[Get your free API key →](https://pdfapihub.com)**
90
10
 
91
- Tip: If you choose **File**, you can pass the binary to nodes like **Write Binary File**, **Google Drive**, **S3**, **Email**, etc.
11
+ ---
92
12
 
93
- URL normalization:
13
+ ## 🚀 Install
94
14
 
95
- - If a URL does not start with `http://` or `https://`, this node auto-adds `https://`.
96
- - If it already starts with `http://` or `https://`, it is used as-is.
97
-
98
- ## Operations
99
-
100
- API reference docs:
101
- https://pdfapihub.com/docs
102
-
103
- ### PDF Parse / Extract Text
104
-
105
- - Endpoint: `POST https://pdfapihub.com/api/v1/pdf/parse`
106
- - Node: **Resource** → PDF Parse / Extract Text
107
- - Operation: **Extract Text / Parse PDF**
108
-
109
- Parameters:
110
-
111
- - **Input Type**: `url` or `file`
112
- - **PDF URL**: Publicly accessible PDF URL (URL mode)
113
- - **Binary Property Name**: incoming binary PDF (File mode)
114
- - **Parse Mode**: `text` (default), `layout`, `tables`, `full`
115
- - **Pages**: `all` or a range like `1-3`
15
+ 1. In n8n, go to **Settings Community Nodes**
16
+ 2. Click **Install a community node**
17
+ 3. Enter: `n8n-nodes-pdf-api-hub`
18
+ 4. Click **Install**
116
19
 
117
- Returns: JSON (extracted text/structure)
20
+ > Official guide: [n8n Community Nodes Installation](https://docs.n8n.io/integrations/community-nodes/installation/)
118
21
 
119
- ### PDF OCR Parse
22
+ ## 🔑 Get your API key
120
23
 
121
- - Endpoint: `POST https://pdfapihub.com/api/v1/pdf/ocr/parse`
122
- - Node: **Resource** OCR to Searchable Text (PDF/Image)
123
- - Operation: **PDF OCR Parse**
24
+ 1. Go to **[pdfapihub.com](https://pdfapihub.com)** and sign up (free tier available)
25
+ 2. Copy your **API key** from the dashboard
124
26
 
125
- Parameters:
27
+ > 📖 Full API docs: [pdfapihub.com/docs](https://pdfapihub.com/docs)
126
28
 
127
- - **PDF Input Type**: `url` or `file`
128
- - **PDF URL** (default: `https://pdfapihub.com/sample-pdfinvoice-with-image.pdf`) (URL mode)
129
- - **Binary Property Name**: incoming binary PDF (File mode)
130
- - **Pages**: page number or `all` (default: `1`, max supported: `8`)
131
- - **Language**, **DPI**, **PSM**, **OEM**
29
+ ## 🔐 Set up credentials in n8n
132
30
 
133
- Returns: JSON (OCR text)
31
+ 1. In n8n, go to **Credentials → New**
32
+ 2. Search for **PDF API Hub API**
33
+ 3. Paste your API key → **Save**
134
34
 
135
- ### Image OCR Parse
35
+ That's it! The node handles everything automatically.
136
36
 
137
- - Endpoint: `POST https://pdfapihub.com/api/v1/image/ocr/parse`
138
- - Node: **Resource** → OCR to Searchable Text (PDF/Image)
139
- - Operation: **Image OCR Parse**
37
+ ---
140
38
 
141
- Parameters:
39
+ ## ✨ What you can do
142
40
 
143
- - **Image Input Type**: `url`, `base64`, or `file`
144
- - **Image URL** (default: `https://pdfapihub.com/sample-invoicepage.png`) (URL mode)
145
- - **Base64 Image** (Base64 mode)
146
- - **Binary Property Name**: incoming binary image (File mode)
147
- - **Language**, **PSM**, **OEM**
41
+ | # | Resource | Operations | What it does |
42
+ |---|----------|-----------|-------------|
43
+ | 1 | **HTML / URL to PDF** | HTML to PDF, URL to PDF | Render HTML or capture any webpage as a pixel-perfect PDF with custom paper size, margins, fonts, and viewport |
44
+ | 2 | **Sign PDF** | Sign PDF, Add Watermark | Stamp a signature image or overlay text/logo watermarks on every page |
45
+ | 3 | **Screenshot to Image** | URL to Image, HTML to Image | Capture full-page screenshots or render HTML to PNG with retina support |
46
+ | 4 | **OCR** | PDF OCR, Image OCR | Extract text from scanned documents and photos — supports English, Portuguese, Russian, and custom languages |
47
+ | 5 | **Extract Text & Tables** | Parse PDF | Pull text, tables, or structured layout data from any PDF |
48
+ | 6 | **PDF to Excel & More** | PDF → XLSX, CSV, DOCX, TXT, HTML, PPTX | Convert PDFs into editable spreadsheets, Word docs, presentations, and more |
49
+ | 7 | **Merge / Split** | Merge PDF, Split PDF | Combine multiple PDFs or split one into pages, ranges, or equal chunks |
50
+ | 8 | **Compress PDF** | Compress PDF | Shrink file size with 4 compression levels (low → max) |
51
+ | 9 | **Protect / Unlock** | Lock PDF, Unlock PDF | Add AES-256 encryption with granular permissions, or remove password protection |
52
+ | 10 | **Scrape Website** | Fetch HTML | Get fully-rendered HTML from any URL using a headless browser — perfect for SPAs |
53
+ | 11 | **Images to PDF** | PNG/JPG/WebP to PDF | Combine images into a PDF with page size, orientation, and fit mode options |
54
+ | 12 | **PDF to Image** | PDF to PNG/JPG/WebP | Render PDF pages as images with DPI, resize, and background color control |
55
+ | 13 | **Compare Documents** | Similarity Check | Compare two PDFs or images for visual similarity |
56
+ | 14 | **File Management** | Upload, List, Delete | Manage your cloud-stored files |
148
57
 
149
- Returns: JSON (OCR text)
58
+ ---
150
59
 
151
- ### PDF Merge
60
+ ## 📖 Operations in detail
152
61
 
153
- - Endpoint: `POST https://pdfapihub.com/api/v1/pdf/merge`
154
- - Node: **Resource** → PDF Merge / Split / Compress
155
- - Operation: **Merge PDF**
62
+ ### 1. HTML / URL to PDF
156
63
 
157
- Parameters:
64
+ Convert HTML or capture any webpage as a PDF.
158
65
 
159
- - **Input Type**: `url` (URLs) or `file` (Binary upload)
160
- - **URLs**: list of PDF URLs (in order) (when Input Type = URL)
161
- - **Binary Property Names**: one or more incoming binary properties containing PDFs (when Input Type = File)
162
- - **Output Format**: `url` / `file` / `base64`
66
+ | Parameter | Description |
67
+ |-----------|-------------|
68
+ | **HTML Content** | Your HTML template (supports `{{placeholders}}`) |
69
+ | **CSS Content** | Optional CSS injected before rendering |
70
+ | **URL** | Any public webpage URL |
71
+ | **Paper Size** | A0–A6, Letter, Legal, Tabloid, Ledger |
72
+ | **Orientation** | Portrait / Landscape |
73
+ | **Margins** | None, Small, Medium, Large, or Custom (px/mm/cm/in) |
74
+ | **Viewport Size** | Standard, Laptop, Desktop, Mobile, Tablet, or Custom |
75
+ | **Output Format** | URL (hosted 30 days), Base64, or Binary File |
76
+ | **Load Google Fonts** | Pipe-separated font names (e.g. `Roboto|Inter`) |
77
+ | **Dynamic Params** | Key/value pairs for `{{placeholder}}` substitution |
78
+ | **Cookie Accept Text** | Auto-click cookie consent popups (URL mode) |
79
+ | **Wait Until** | Fully Loaded, DOM Ready, Network Quiet, or First Response |
80
+ | **Advanced** | Print background, header/footer, CSS page size, max pages, navigation timeout |
163
81
 
164
- Returns:
82
+ ---
165
83
 
166
- - `url` / `base64`: JSON
167
- - `file`: binary PDF
84
+ ### 2. Sign PDF & Watermark
168
85
 
169
- ### PDF Split
86
+ **Sign PDF** — stamp a signature image onto your documents.
170
87
 
171
- - Endpoint: `POST https://pdfapihub.com/api/v1/pdf/split`
172
- - Node: **Resource** → PDF Merge / Split / Compress
173
- - Operation: **Split PDF**
88
+ | Parameter | Description |
89
+ |-----------|-------------|
90
+ | **PDF Input** | URL, Base64, or Binary File |
91
+ | **Signature** | Image URL or Base64 (PNG/JPG/WebP, transparent PNGs supported) |
92
+ | **Page** | Specific page number, or sign all pages |
93
+ | **Position** | Bottom Right, Bottom Left, Center, Top Right, etc. |
94
+ | **Advanced** | Custom X/Y coordinates, width/height, opacity |
174
95
 
175
- Parameters:
96
+ **Add Watermark** — overlay text or a logo across every page.
176
97
 
177
- - **Input Type**: `url` or `file`
178
- - **PDF URL**: URL of the PDF to split (URL mode)
179
- - **Binary Property Name**: incoming binary PDF (File mode)
180
- - **Split Type**:
181
- - `pages` (extract specific pages)
182
- - `each` (split every page)
183
- - `chunks` (split into N chunks)
184
- - **Pages**: e.g. `1-3,5` (only for `pages`)
185
- - **Number of Chunks**: (only for `chunks`)
186
- - **Output Format**: `url` / `file` / `base64`
98
+ | Parameter | Description |
99
+ |-----------|-------------|
100
+ | **Watermark Text** | Any text (default: CONFIDENTIAL) |
101
+ | **Opacity** | 0 (invisible) to 1 (fully opaque) |
102
+ | **Position** | Center, Top/Bottom Left/Right/Center |
103
+ | **Mode** | Single placement or Tiled (repeats diagonally) |
104
+ | **Advanced** | Text color, font size, image watermark URL |
187
105
 
188
- Returns:
106
+ ---
189
107
 
190
- - `url` / `base64`: JSON
191
- - `file`: binary (often a ZIP or PDF, depending on the API response)
108
+ ### 3. Screenshot Website to Image
192
109
 
193
- ### PDF Compress
110
+ Capture webpages or render HTML as PNG images.
194
111
 
195
- - Endpoint: `POST https://pdfapihub.com/api/v1/compressPdf`
196
- - Node: **Resource** → PDF Merge / Split / Compress
197
- - Operation: **Compress PDF**
112
+ | Parameter | Description |
113
+ |-----------|-------------|
114
+ | **URL / HTML** | Webpage URL or HTML content |
115
+ | **Output Format** | URL, Base64, Both (URL + Base64), or Binary File |
116
+ | **Image Size** | Width × Height in pixels (HTML mode) |
117
+ | **Viewport** | Desktop, Laptop, Mobile, Tablet, or Custom |
118
+ | **Full Page** | Capture the entire scrollable page (URL mode) |
119
+ | **Cookie Accept** | Auto-dismiss consent popups |
120
+ | **Advanced** | Device scale factor (2× for retina), quality (30–100) |
198
121
 
199
- Parameters:
122
+ ---
200
123
 
201
- - **Input Type**: `url` or `file`
202
- - **PDF URL** (URL mode)
203
- - **Binary Property Name** (File mode)
204
- - **Compression Level**: `low` / `medium` / `high` / `max`
205
- - **Output Type**: `url` / `file` / `base64`
206
- - **Output Filename**: used when output is file
124
+ ### 4. OCR Read Scanned PDFs & Images
207
125
 
208
- Returns:
126
+ Extract text from scanned documents using Tesseract OCR.
209
127
 
210
- - `url` / `base64`: JSON
211
- - `file`: binary PDF
128
+ | Parameter | Description |
129
+ |-----------|-------------|
130
+ | **Input** | URL or Binary File (PDF or Image) |
131
+ | **Language** | English, Portuguese, Russian, or custom code (e.g. `eng+hin`) |
132
+ | **Pages** | All, single page, range (`1-3`), or mixed (`1,3,5-8`) |
133
+ | **Detail Level** | Text Only, or Words + Bounding Boxes |
134
+ | **Response Format** | JSON (structured) or Plain Text |
135
+ | **Advanced (PDF)** | DPI (72–400), character whitelist, PSM, OEM |
136
+ | **Advanced (Image)** | Grayscale, sharpen, binarization threshold, resize scale |
212
137
 
213
- ### PDF Lock
138
+ ---
214
139
 
215
- - Endpoint: `POST https://pdfapihub.com/api/v1/lockPdf`
216
- - Node: **Resource** → PDF Security (Lock / Unlock)
217
- - Operation: **Lock PDF**
140
+ ### 5. Extract PDF Text & Tables
218
141
 
219
- Parameters:
142
+ Pull structured data from any PDF — no OCR needed for digital PDFs.
220
143
 
221
- - **Input Type**: `url` or `file`
222
- - **PDF URL** (URL mode)
223
- - **Binary Property Name** (File mode)
224
- - **Password**: password to set
225
- - **Input Password**: optional (if the input PDF is already encrypted)
226
- - **Output Type**: `url` / `file` / `base64`
227
- - **Output Filename**
144
+ | Parameter | Description |
145
+ |-----------|-------------|
146
+ | **Input** | URL or Binary File |
147
+ | **Parse Mode** | Text Only, Layout (with bounding boxes), Tables, or Full |
148
+ | **Pages** | All or specific page selection |
228
149
 
229
- Returns:
150
+ ---
230
151
 
231
- - `url` / `base64`: JSON
232
- - `file`: binary PDF
152
+ ### 6. PDF to Excel / CSV / Word / PowerPoint
233
153
 
234
- ### PDF Unlock
154
+ Convert PDFs into editable formats.
235
155
 
236
- - Endpoint: `POST https://pdfapihub.com/api/v1/unlockPdf`
237
- - Node: **Resource** → PDF Security (Lock / Unlock)
238
- - Operation: **Unlock PDF**
156
+ | Operation | Output | Description |
157
+ |-----------|--------|-------------|
158
+ | **PDF to Excel (XLSX)** | `.xlsx` | Tables extracted into spreadsheet — one sheet per page |
159
+ | **PDF to CSV** | `.csv` | Table data in CSV format |
160
+ | **PDF to Word (DOCX)** | `.docx` | Editable Word document with optional page selection |
161
+ | **PDF to Text** | `.txt` | Plain extracted text |
162
+ | **PDF to HTML** | `.html` | Styled HTML document |
163
+ | **PDF to PowerPoint** | `.pptx` | Each page becomes a slide |
164
+ | **Document to PDF** | `.pdf` | Convert DOCX, PPTX, XLSX, CSV, TXT, ODT → PDF |
239
165
 
240
- Parameters:
166
+ All operations support: URL / Binary File input, URL / Base64 / Binary output, optional page selection, and custom output filename.
241
167
 
242
- - **Input Type**: `url` or `file`
243
- - **PDF URL** (URL mode)
244
- - **Binary Property Name** (File mode)
245
- - **Password**: password to unlock
246
- - **Output Type**: `url` / `file` / `base64`
247
- - **Output Filename**
168
+ ---
248
169
 
249
- Returns:
170
+ ### 7. Merge / Split PDF
250
171
 
251
- - `url` / `base64`: JSON
252
- - `file`: binary PDF
172
+ **Merge** combine multiple PDFs into one.
253
173
 
254
- ### URL to PDF (Website Screenshot)
174
+ | Parameter | Description |
175
+ |-----------|-------------|
176
+ | **Input** | PDF URLs (Google Drive links supported) or Binary Files |
177
+ | **Output Format** | URL, Base64, or Binary File |
178
+ | **Output Filename** | Custom name for the merged file |
179
+ | **Advanced** | PDF metadata (title, author, subject, keywords) |
255
180
 
256
- - Endpoint: `POST https://pdfapihub.com/api/v1/generatePdf`
257
- - Node: **Resource** → Website / HTML to PDF
258
- - Operation: **URL to PDF**
181
+ **Split** break a PDF into parts.
259
182
 
260
- Parameters:
183
+ | Parameter | Description |
184
+ |-----------|-------------|
185
+ | **Split Mode** | Each Page, Specific Pages (`1-3,5,8-`), or Equal Chunks (2–100) |
186
+ | **Output** | URL (individual + ZIP), Base64 (ZIP), or Binary (ZIP) |
261
187
 
262
- - **URL**: website URL to capture
263
- - **Full Page**: capture full page or viewport
264
- - **Wait Till**: delay in ms before capture
265
- - **Viewport Width / Height**
266
- - **Output Format**: `url` / `file`
267
- - **Output Filename**
268
- - **Timeout**: request timeout in seconds
188
+ ---
269
189
 
270
- Returns:
190
+ ### 8. Compress PDF
271
191
 
272
- - `url`: JSON with a PDF URL
273
- - `file`: binary PDF
192
+ Reduce file size with configurable compression.
274
193
 
275
- ### Image to PDF (PNG/WebP/JPG)
194
+ | Parameter | Description |
195
+ |-----------|-------------|
196
+ | **Compression Level** | Low, Medium, High (default), or Max |
197
+ | **Output Format** | URL, Base64, or Binary File |
276
198
 
277
- - Endpoint: `POST https://pdfapihub.com/api/v1/convert/image/pdf`
278
- - Node: **Resource** → Image to PDF
279
- - Operations: **PNG to PDF**, **WebP to PDF**, **JPG to PDF**
199
+ > 💡 URL/Base64 responses include compression statistics — original size, compressed size, ratio, and bytes saved.
280
200
 
281
- Parameters:
201
+ ---
282
202
 
283
- - **Input Type**: `url` / `base64` / `file`
284
- - URL placeholders:
285
- - PNG: `https://pdfapihub.com/sample.png`
286
- - WebP: `https://pdfapihub.com/sample.webp`
287
- - JPG: `https://pdfapihub.com/sample.jpg`
288
- - **Output Format**: `url` / `base64` / `both` / `file`
289
- - **Output Filename**
203
+ ### 9. Protect / Unlock PDF
290
204
 
291
- ### Document to PDF (DOCX/DOC/PPTX/XLSX/etc.)
205
+ **Lock** add password protection with enterprise-grade encryption.
292
206
 
293
- - Endpoint: `POST https://pdfapihub.com/api/v1/convert/document/pdf`
294
- - Node: **Resource** → Document Conversion
295
- - Operation: **DOCX / Document to PDF**
207
+ | Parameter | Description |
208
+ |-----------|-------------|
209
+ | **Password** | Required to open the PDF |
210
+ | **Advanced** | Owner password, encryption (AES-256/128, RC4), 8 granular permissions (print, copy, modify, annotate, forms, extract, assemble, high-res print) |
296
211
 
297
- Parameters:
212
+ **Unlock** — remove password protection using multiple decryption engines.
298
213
 
299
- - **Input Type**: `url` / `base64` / `file`
300
- - **Document URL** (URL mode)
301
- - **Base64 File** (Base64 mode)
302
- - **Binary Property Name** (File mode)
303
- - **Input Format** (optional): `doc`, `docx`, `odt`, `rtf`, `txt`, `ppt`, `pptx`, `odp`, `xls`, `xlsx`, `ods`
304
- - **Output Format**: `url` / `base64` / `both` / `file`
305
- - **Output Filename**
214
+ ---
306
215
 
307
- ### PDF to DOCX
216
+ ### 10. Scrape Website HTML
308
217
 
309
- - Endpoint: `POST https://pdfapihub.com/api/v1/convert/pdf/docx`
310
- - Node: **Resource** → Document Conversion
311
- - Operation: **PDF to DOCX**
218
+ Fetch fully-rendered HTML from any URL using a headless browser.
312
219
 
313
- Parameters:
220
+ | Parameter | Description |
221
+ |-----------|-------------|
222
+ | **URL** | Any public webpage |
223
+ | **Wait Until** | Fully Loaded, DOM Ready, Network Quiet, or First Response |
224
+ | **Wait for Element** | CSS selector to wait for (great for SPAs) |
225
+ | **Extra Delay** | Additional milliseconds after page load |
226
+ | **Viewport** | Desktop, Laptop, Mobile, Tablet, or Custom |
227
+ | **Advanced** | Navigation timeout, custom User-Agent, extra HTTP headers |
314
228
 
315
- - **Input Type**: `url` / `base64` / `file`
316
- - **PDF URL** (URL mode)
317
- - **Base64 PDF** (Base64 mode)
318
- - **Binary Property Name** (File mode)
319
- - **Output Format**: `url` / `base64` / `both` / `file`
320
- - **Output Filename**
229
+ ---
321
230
 
322
- ### PDF to Image (PNG/WebP/JPG)
231
+ ### 11–12. Images PDF
323
232
 
324
- - Endpoint: `POST https://pdfapihub.com/api/v1/convert/pdf/image`
325
- - Node: **Resource** → PDF to Image
326
- - Operations: **PDF to PNG**, **PDF to WebP**, **PDF to JPG**
233
+ **Images to PDF** — combine images into a document.
327
234
 
328
- Parameters:
235
+ | Parameter | Description |
236
+ |-----------|-------------|
237
+ | **Page Size** | Original (match image), A3, A4, A5, Letter, Legal, Tabloid |
238
+ | **Fit Mode** | Fit (preserve aspect), Fill (may crop), Stretch, or Original |
239
+ | **Orientation** | Portrait / Landscape |
240
+ | **Margin** | 0–200 points padding |
329
241
 
330
- - **Input Type**: `url` or `file`
331
- - **PDF URL** (URL mode)
332
- - **Binary Property Name** (File mode)
333
- - **Pages**, **DPI**, **Quality**, **Output Format**
242
+ **PDF to Image** render pages as PNG, JPG, or WebP.
334
243
 
335
- ### HTML to PDF
244
+ | Parameter | Description |
245
+ |-----------|-------------|
246
+ | **DPI** | 72–300 (higher = sharper) |
247
+ | **Quality** | 1–100 (JPG/WebP) |
248
+ | **Advanced** | Resize width/height, background color for transparent PNGs |
336
249
 
337
- - Endpoint: `POST https://pdfapihub.com/api/v1/generatePdf`
338
- - Node: **Resource** → Website / HTML to PDF
339
- - Operation: **HTML to PDF**
250
+ ---
340
251
 
341
- Parameters:
252
+ ### 13. Compare Documents
342
253
 
343
- - **HTML Content**
344
- - **CSS Content**
345
- - **Dynamic Params**: optional key/value replacements for templating
346
- - **Viewport Width / Height**
347
- - **Output Format**: `url` / `file`
348
- - **Output Filename**
349
- - **Timeout**: request timeout in seconds
254
+ Check visual similarity between two PDFs or images.
350
255
 
351
- Returns:
256
+ | Parameter | Description |
257
+ |-----------|-------------|
258
+ | **Input** | Two URLs, two Base64 strings, or two Binary Files |
259
+ | **Method** | Auto (default), Feature Match, SSIM, or PHash |
352
260
 
353
- - `url`: JSON with a PDF URL
354
- - `file`: binary PDF
261
+ ---
355
262
 
356
- ### URL to Image
263
+ ### 14. File Management
357
264
 
358
- - Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
359
- - Node: **Resource** → Website / HTML to Image
360
- - Operation: **URL to Image**
265
+ Manage files in your cloud storage.
361
266
 
362
- Returns JSON or binary image (based on output format).
267
+ | Operation | Description |
268
+ |-----------|-------------|
269
+ | **Upload File** | Upload any file — returns hosted URL (auto-deleted after 30 days) |
270
+ | **List Files** | List all your uploaded files (newest first, limit 1–500) |
271
+ | **Delete File** | Delete a file by URL (ownership enforced) |
363
272
 
364
- ### HTML to Image
273
+ ---
365
274
 
366
- - Endpoint: `POST https://pdfapihub.com/api/v1/generateImage`
367
- - Node: **Resource** → Website / HTML to Image
368
- - Operation: **HTML to Image**
275
+ ## 🔌 How output formats work
369
276
 
370
- Returns JSON or binary image (based on output format).
277
+ Most operations let you choose how to receive the result:
371
278
 
372
- ### URL to HTML
279
+ | Format | Best for | What you get |
280
+ |--------|---------|-------------|
281
+ | **URL (Hosted Link)** | Sharing, webhooks, storing | A downloadable URL — file hosted for 30 days |
282
+ | **Base64 (Inline Data)** | Embedding in emails, chaining nodes | The file as a base64 string inside JSON |
283
+ | **Binary File** | Piping to Google Drive, S3, Email, etc. | Raw binary data you can pass to any n8n file node |
373
284
 
374
- - Endpoint: `POST https://pdfapihub.com/api/v1/url-to-html`
375
- - Node: **Resource** → URL to HTML
376
- - Operation: **Fetch HTML**
285
+ > 💡 **Tip**: Choose **Binary File** when you want to pass the output directly to nodes like Write Binary File, Google Drive, AWS S3, or Send Email.
377
286
 
378
- Defaults include URL `http://example.com/`.
287
+ ---
379
288
 
380
- ### Watermark (PDF/Image)
289
+ ## 💬 Support & resources
381
290
 
382
- - Endpoint: `POST https://pdfapihub.com/api/v1/watermark`
383
- - Node: **Resource** Watermark PDF
384
- - Operation: **Add Watermark**
291
+ - 🔑 **Get API key**: [pdfapihub.com](https://pdfapihub.com)
292
+ - 📖 **API documentation**: [pdfapihub.com/docs](https://pdfapihub.com/docs)
293
+ - 🐛 **Report a bug**: [GitHub Issues](https://github.com/Pdfapihub/n8n-nodes-pdf-api-hub/issues)
294
+ - 💬 **Questions**: [support@pdfapihub.com](mailto:support@pdfapihub.com)
385
295
 
386
- Supports URL/base64/file input and file/url/base64/both output.
296
+ ---
387
297
 
388
- ## Support
298
+ ## 📄 License
389
299
 
390
- - PDF API Hub documentation: https://pdfapihub.com/docs
391
- - Website: https://pdfapihub.com
392
- - Issues/bugs: https://github.com/Pdfapihub/n8n-nodes-pdf-api-hub/issues
300
+ [MIT](LICENSE.md)
393
301
 
394
- ## License
302
+ ---
395
303
 
396
- [MIT](LICENSE.md)
304
+ <p align="center">
305
+ <a href="https://pdfapihub.com">
306
+ <img src="images/bannerpdfapihub.png" alt="PDF API Hub" width="600">
307
+ </a>
308
+ <br>
309
+ <strong>Made with ❤️ by <a href="https://pdfapihub.com">PDF API Hub</a></strong>
310
+ </p>