n8n-nodes-pdf4me 0.1.0 → 0.1.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.md +19 -0
- package/README.md +239 -0
- package/index.js +11 -0
- package/package.json +6 -3
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# n8n-nodes-pdf4me
|
|
2
|
+
|
|
3
|
+
This is an n8n community node that enables you to integrate PDF4ME's powerful PDF processing capabilities into your n8n workflows. PDF4ME is a comprehensive PDF processing API that allows you to convert, generate barcodes, process images, and manipulate documents programmatically.
|
|
4
|
+
|
|
5
|
+
n8n is a fair-code licensed workflow automation platform.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Operations](#operations)
|
|
11
|
+
- [Credentials](#credentials)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Resources](#resources)
|
|
14
|
+
- [Version History](#version-history)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
### Community Nodes (Recommended)
|
|
19
|
+
|
|
20
|
+
For users on n8n v0.187+, you can install this node directly from the n8n Community Nodes panel in the n8n editor:
|
|
21
|
+
|
|
22
|
+
1. Open your n8n editor
|
|
23
|
+
2. Go to **Settings > Community Nodes**
|
|
24
|
+
3. Search for "n8n-nodes-pdf4me"
|
|
25
|
+
4. Click **Install**
|
|
26
|
+
5. Reload the editor
|
|
27
|
+
|
|
28
|
+
### Manual Installation
|
|
29
|
+
|
|
30
|
+
You can also install this node manually:
|
|
31
|
+
|
|
32
|
+
1. Navigate to your n8n installation directory
|
|
33
|
+
2. Run the following command:
|
|
34
|
+
```bash
|
|
35
|
+
npm install n8n-nodes-pdf4me
|
|
36
|
+
```
|
|
37
|
+
3. Restart your n8n server
|
|
38
|
+
|
|
39
|
+
For Docker-based deployments, add the package to your package.json and rebuild the image:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"name": "n8n-custom",
|
|
44
|
+
"version": "1.0.0",
|
|
45
|
+
"description": "",
|
|
46
|
+
"main": "index.js",
|
|
47
|
+
"scripts": {
|
|
48
|
+
"start": "n8n"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"n8n": "^1.0.0",
|
|
52
|
+
"n8n-nodes-pdf4me": "^0.1.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Operations
|
|
58
|
+
|
|
59
|
+
This node provides comprehensive document processing capabilities through PDF4ME's API. Here are the available features:
|
|
60
|
+
|
|
61
|
+
### 1. Barcode Generation
|
|
62
|
+
**Generate Barcode**: Create various types of barcodes with customizable options
|
|
63
|
+
|
|
64
|
+
#### Supported Barcode Types
|
|
65
|
+
- **QR Code** (default)
|
|
66
|
+
- **Code 128, Code 39, Code 93**
|
|
67
|
+
- **EAN-8, EAN-13, EAN-14**
|
|
68
|
+
- **UPC-A, UPC-E**
|
|
69
|
+
- **PDF417, Micro PDF417**
|
|
70
|
+
- **Data Matrix**
|
|
71
|
+
- **Aztec**
|
|
72
|
+
- **MaxiCode**
|
|
73
|
+
- And many more (100+ barcode types supported)
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
- **File Name**: Name for the generated barcode file
|
|
77
|
+
- **File Content**: Base64 encoded content of input file (optional)
|
|
78
|
+
- **Text**: The text/data to encode in the barcode
|
|
79
|
+
- **Barcode Type**: Select from 100+ supported barcode formats
|
|
80
|
+
- **Hide Text**: Whether to hide or display the text alongside the barcode
|
|
81
|
+
- **Additional Options**: Various formatting and styling options
|
|
82
|
+
|
|
83
|
+
### 2. URL/HTML to PDF Conversion
|
|
84
|
+
**URL to PDF**: Convert web pages to PDF while preserving layout, styling, and content
|
|
85
|
+
|
|
86
|
+
#### Parameters
|
|
87
|
+
- **Web URL**: The URL of the web page to convert (required)
|
|
88
|
+
- **File Name**: Name for the generated PDF file
|
|
89
|
+
- **Authentication Type**: NoAuth or Basic authentication for protected sites
|
|
90
|
+
- **Username/Password**: Credentials if Basic authentication is required
|
|
91
|
+
- **Page Layout**: Portrait or Landscape orientation
|
|
92
|
+
- **Page Format**: A0-A8, Tabloid, Legal, Statement, Executive formats
|
|
93
|
+
- **Advanced Options**:
|
|
94
|
+
- **Scale**: Zoom factor for the web page (0.1 to 2.0)
|
|
95
|
+
- **Margins**: Top, Left, Right, Bottom margins (e.g., 20px, 1cm, 0.5in)
|
|
96
|
+
- **Print Background**: Include background colors and images
|
|
97
|
+
- **Display Header Footer**: Show header and footer in PDF
|
|
98
|
+
- **Custom Profiles**: Additional API configuration options
|
|
99
|
+
|
|
100
|
+
### 3. PDF to Other Formats
|
|
101
|
+
**PDF to Word**: Convert PDF documents to editable Word format with OCR support
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
- **Input Data Type**: Choose between Binary Data (from previous node), Base64 String, URL, or File Path
|
|
105
|
+
- **Input Binary Field**: Name of the binary property containing the PDF (when using Binary Data)
|
|
106
|
+
- **Base64 PDF Content**: Direct base64 encoded PDF content (when using Base64 String)
|
|
107
|
+
- **PDF URL**: URL to the PDF file to convert (when using URL)
|
|
108
|
+
- **Local File Path**: Path to PDF file on local filesystem (when using File Path)
|
|
109
|
+
- **Output File Name**: Name for the generated Word document
|
|
110
|
+
- **Document Name**: Name of the source PDF file for reference
|
|
111
|
+
- **Quality Type**:
|
|
112
|
+
- **Draft**: Faster conversion, good for simple PDFs with clear text
|
|
113
|
+
- **Quality**: Slower but more accurate, better for complex layouts
|
|
114
|
+
- **OCR Language**: Language for text recognition (English, Spanish, French, German, Italian, Portuguese, Russian, Chinese, Japanese, Korean, Arabic, Dutch, Swedish, Norwegian, Danish, Finnish)
|
|
115
|
+
- **Advanced Options**:
|
|
116
|
+
- **Merge All Sheets**: Combine multiple pages into single document flow
|
|
117
|
+
- **Preserve Output Format**: Maintain original formatting when possible
|
|
118
|
+
- **Use OCR When Needed**: Enable OCR for scanned PDFs
|
|
119
|
+
- **Use Async Processing**: Enhanced timeout handling for complex PDFs (up to 25 minutes)
|
|
120
|
+
- **Max Retries**: Maximum polling attempts for async processing (increased for complex PDFs)
|
|
121
|
+
- **Retry Delay**: Base seconds between polling attempts (actual delay increases exponentially)
|
|
122
|
+
- **Custom Profiles**: Additional API configuration options
|
|
123
|
+
|
|
124
|
+
### 4. Data Conversion
|
|
125
|
+
**JSON to Excel**: Convert JSON data to Excel spreadsheet with customizable formatting
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
- **Input Data Type**: Choose between JSON String (direct input), Binary Data (from previous node), or Base64 String
|
|
129
|
+
- **JSON Content**: Direct JSON data input with syntax highlighting (when using JSON String)
|
|
130
|
+
- **Input Binary Field**: Name of the binary property containing the JSON file (when using Binary Data)
|
|
131
|
+
- **Base64 JSON Content**: Direct base64 encoded JSON content (when using Base64 String)
|
|
132
|
+
- **Output File Name**: Name for the generated Excel file
|
|
133
|
+
- **Document Name**: Name of the output document for reference
|
|
134
|
+
- **Worksheet Name**: Name of the Excel worksheet (default: Sheet1)
|
|
135
|
+
- **Advanced Options**:
|
|
136
|
+
- **Title Bold**: Make the title row bold (default: true)
|
|
137
|
+
- **Title Wrap Text**: Wrap text in title cells (default: true)
|
|
138
|
+
- **Convert Numbers and Dates**: Automatically convert numbers and dates (default: false)
|
|
139
|
+
- **Ignore Null Values**: Ignore null values in the JSON (default: false)
|
|
140
|
+
- **Number Format**: Excel number format codes (0-22) for General, Number, Currency, Percentage, Scientific, Fraction, Date/Time formats
|
|
141
|
+
- **Date Format**: Date format pattern for Excel cells (e.g., MM/dd/yyyy)
|
|
142
|
+
- **First Row**: Starting row number (1-based, default: 1)
|
|
143
|
+
- **First Column**: Starting column number (1-based, default: 1)
|
|
144
|
+
- **Custom Profiles**: Additional API configuration options
|
|
145
|
+
|
|
146
|
+
### 5. Image Processing
|
|
147
|
+
**Crop Image**: Crop images with border or rectangle cropping options
|
|
148
|
+
|
|
149
|
+
#### Parameters
|
|
150
|
+
- **Input Data Type**: Choose between Binary Data (from previous node), Base64 String, or File Path
|
|
151
|
+
- **Input Binary Field**: Name of the binary property containing the image file (when using Binary Data)
|
|
152
|
+
- **Base64 Image Content**: Direct base64 encoded image content (when using Base64 String)
|
|
153
|
+
- **Local File Path**: Path to image file on local filesystem (when using File Path)
|
|
154
|
+
- **Output File Name**: Name for the output cropped image file
|
|
155
|
+
- **Document Name**: Name of the source image file for reference
|
|
156
|
+
- **Crop Type**:
|
|
157
|
+
- **Border**: Crop by removing borders from all sides
|
|
158
|
+
- **Rectangle**: Crop to a specific rectangular area
|
|
159
|
+
- **Border Cropping Options** (when Crop Type = Border):
|
|
160
|
+
- **Left Border**: Number of pixels to crop from the left border
|
|
161
|
+
- **Right Border**: Number of pixels to crop from the right border
|
|
162
|
+
- **Top Border**: Number of pixels to crop from the top border
|
|
163
|
+
- **Bottom Border**: Number of pixels to crop from the bottom border
|
|
164
|
+
- **Rectangle Cropping Options** (when Crop Type = Rectangle):
|
|
165
|
+
- **Upper Left X**: X coordinate of the upper left corner of the crop rectangle
|
|
166
|
+
- **Upper Left Y**: Y coordinate of the upper left corner of the crop rectangle
|
|
167
|
+
- **Width**: Width of the crop rectangle in pixels
|
|
168
|
+
- **Height**: Height of the crop rectangle in pixels
|
|
169
|
+
- **Advanced Options**:
|
|
170
|
+
- **Custom Profiles**: Additional API configuration options
|
|
171
|
+
|
|
172
|
+
## Credentials
|
|
173
|
+
|
|
174
|
+
To use this node, you need a PDF4ME API key. Here's how to get started:
|
|
175
|
+
|
|
176
|
+
1. Sign up for a PDF4ME account at [PDF4ME Developer Portal](https://developer.pdf4me.com/)
|
|
177
|
+
2. Navigate to your dashboard and obtain your API key
|
|
178
|
+
3. In n8n, add your PDF4ME credentials by providing your API key
|
|
179
|
+
|
|
180
|
+
## Usage
|
|
181
|
+
|
|
182
|
+
This node allows you to automate document processing tasks in your n8n workflows. Here are some common use cases:
|
|
183
|
+
|
|
184
|
+
### Document Processing
|
|
185
|
+
- Convert PDF documents to editable Word format with OCR support
|
|
186
|
+
- Process complex PDFs with enhanced timeout handling (up to 25 minutes)
|
|
187
|
+
- Extract text from PDF documents for data processing
|
|
188
|
+
- Convert various document formats to PDF
|
|
189
|
+
|
|
190
|
+
### Barcode Operations
|
|
191
|
+
- Generate QR codes for product tracking
|
|
192
|
+
- Create product barcodes (EAN-13, UPC-A) for inventory management
|
|
193
|
+
- Generate barcodes for document identification
|
|
194
|
+
- Embed barcodes in documents and reports
|
|
195
|
+
|
|
196
|
+
### Web Content Processing
|
|
197
|
+
- Convert web pages to PDF for archiving
|
|
198
|
+
- Automatically convert HTML reports to PDF
|
|
199
|
+
- Capture web-based dashboards and reports
|
|
200
|
+
- Convert protected web content with authentication
|
|
201
|
+
|
|
202
|
+
### Data Export and Reporting
|
|
203
|
+
- Convert JSON data to Excel spreadsheets
|
|
204
|
+
- Transform API responses to formatted reports
|
|
205
|
+
- Export analytics data to Excel for stakeholder reports
|
|
206
|
+
- Create automated data processing pipelines
|
|
207
|
+
|
|
208
|
+
### Image Processing
|
|
209
|
+
- Crop images for specific dimensions
|
|
210
|
+
- Remove borders from scanned documents
|
|
211
|
+
- Process product images for e-commerce
|
|
212
|
+
- Create thumbnails and optimized images
|
|
213
|
+
|
|
214
|
+
### Automated Workflows
|
|
215
|
+
- Chain multiple PDF4ME operations together
|
|
216
|
+
- Integrate with email nodes for automated document distribution
|
|
217
|
+
- Connect with storage services for file management
|
|
218
|
+
- Build complete document processing pipelines
|
|
219
|
+
|
|
220
|
+
For detailed examples and workflow templates, visit our documentation.
|
|
221
|
+
|
|
222
|
+
## Resources
|
|
223
|
+
|
|
224
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
225
|
+
- [PDF4ME API Documentation](https://developer.pdf4me.com/api/)
|
|
226
|
+
- [PDF4ME Developer Portal](https://developer.pdf4me.com/)
|
|
227
|
+
- [PDF4ME Support](mailto:support@pdf4me.com)
|
|
228
|
+
|
|
229
|
+
## Version History
|
|
230
|
+
|
|
231
|
+
### 0.1.0
|
|
232
|
+
- Initial release with comprehensive document processing capabilities
|
|
233
|
+
- Full integration with PDF4ME API services
|
|
234
|
+
- Support for barcode generation, URL to PDF conversion, PDF to Word conversion, JSON to Excel conversion, and image cropping
|
|
235
|
+
- Enhanced timeout handling for complex PDF to Word conversions (up to 25 minutes)
|
|
236
|
+
- Improved async processing with exponential backoff and better error handling
|
|
237
|
+
- Support for multiple input types (Binary Data, Base64, URL, File Path)
|
|
238
|
+
- Advanced OCR capabilities with multi-language support
|
|
239
|
+
- Comprehensive barcode generation with 100+ supported formats
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-pdf4me",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "n8n community node for PDF4ME API integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package"
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"n8n": {
|
|
31
31
|
"n8nNodesApiVersion": 1,
|
|
32
32
|
"credentials": [
|
|
33
|
-
"
|
|
33
|
+
"credentials/Pdf4meApi.credentials.js"
|
|
34
34
|
],
|
|
35
35
|
"nodes": [
|
|
36
|
-
"
|
|
36
|
+
"nodes/Pdf4me/Pdf4me.node.js"
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -47,5 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"n8n-workflow": "*"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"n8n-nodes-pdf4me": "^0.1.0"
|
|
50
53
|
}
|
|
51
54
|
}
|