@custom-js/n8n-nodes-pdf-toolkit 1.50.0 → 1.51.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/dist/nodes/CompressPDF/CompressPDF.node.js +10 -1
- package/dist/nodes/ExtractPages/ExtractPages.node.js +10 -1
- package/dist/nodes/Html2Docx/Html2Docx.node.js +10 -1
- package/dist/nodes/Html2Pdf/Html2Pdf.node.js +10 -1
- package/dist/nodes/InvoiceGenerator/InvoiceGenerator.node.js +10 -1
- package/dist/nodes/MergePdfs/MergePdfs.node.js +10 -1
- package/dist/nodes/PdfFormFill/PdfFormFill.node.js +10 -1
- package/dist/nodes/PdfToPng/PdfToPng.node.js +10 -1
- package/dist/nodes/Scraper/Scraper.node.js +15 -1
- package/dist/nodes/WebsiteScreenshot/WebsiteScreenshot.node.js +10 -1
- package/package.json +1 -1
|
@@ -47,6 +47,14 @@ class CompressPDF {
|
|
|
47
47
|
description: "The field name for binary PDF file or url that indicates PDF file. Please make sure the size of PDf file doesn't exceed 6mb. If it's bigger, pass URL rather than binary file.",
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
displayName: "Output Filename",
|
|
52
|
+
name: "outputFilename",
|
|
53
|
+
type: "string",
|
|
54
|
+
default: "output.pdf",
|
|
55
|
+
description: "Name for the generated PDF file (include .pdf extension)",
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
50
58
|
],
|
|
51
59
|
};
|
|
52
60
|
}
|
|
@@ -100,7 +108,8 @@ class CompressPDF {
|
|
|
100
108
|
});
|
|
101
109
|
continue;
|
|
102
110
|
}
|
|
103
|
-
const
|
|
111
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.pdf");
|
|
112
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
104
113
|
returnData.push({
|
|
105
114
|
json: items[i].json,
|
|
106
115
|
binary: {
|
|
@@ -54,6 +54,14 @@ class ExtractPages {
|
|
|
54
54
|
default: "1",
|
|
55
55
|
description: "The range of pages to extract. Default is first page. (ex: 1-3, or 4)",
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
displayName: "Output Filename",
|
|
59
|
+
name: "outputFilename",
|
|
60
|
+
type: "string",
|
|
61
|
+
default: "output.pdf",
|
|
62
|
+
description: "Name for the generated PDF file (include .pdf extension)",
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
57
65
|
],
|
|
58
66
|
};
|
|
59
67
|
}
|
|
@@ -110,7 +118,8 @@ class ExtractPages {
|
|
|
110
118
|
});
|
|
111
119
|
continue;
|
|
112
120
|
}
|
|
113
|
-
const
|
|
121
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.pdf");
|
|
122
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
114
123
|
returnData.push({
|
|
115
124
|
json: items[i].json,
|
|
116
125
|
binary: {
|
|
@@ -34,6 +34,14 @@ class Html2Docx {
|
|
|
34
34
|
description: "The HTML content to convert to Docx",
|
|
35
35
|
required: true,
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
displayName: "Output Filename",
|
|
39
|
+
name: "outputFilename",
|
|
40
|
+
type: "string",
|
|
41
|
+
default: "output.docx",
|
|
42
|
+
description: "Name for the generated DOCX file (include .docx extension)",
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
37
45
|
],
|
|
38
46
|
};
|
|
39
47
|
}
|
|
@@ -69,7 +77,8 @@ class Html2Docx {
|
|
|
69
77
|
});
|
|
70
78
|
continue;
|
|
71
79
|
}
|
|
72
|
-
const
|
|
80
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.docx");
|
|
81
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
73
82
|
returnData.push({
|
|
74
83
|
json: items[i].json,
|
|
75
84
|
binary: {
|
|
@@ -34,6 +34,14 @@ class Html2Pdf {
|
|
|
34
34
|
description: "The HTML content to convert to PDF",
|
|
35
35
|
required: true,
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
displayName: "Output Filename",
|
|
39
|
+
name: "outputFilename",
|
|
40
|
+
type: "string",
|
|
41
|
+
default: "output.pdf",
|
|
42
|
+
description: "Name for the generated PDF file (include .pdf extension)",
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
37
45
|
],
|
|
38
46
|
};
|
|
39
47
|
}
|
|
@@ -69,7 +77,8 @@ class Html2Pdf {
|
|
|
69
77
|
});
|
|
70
78
|
continue;
|
|
71
79
|
}
|
|
72
|
-
const
|
|
80
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.pdf");
|
|
81
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
73
82
|
returnData.push({
|
|
74
83
|
json: items[i].json,
|
|
75
84
|
binary: {
|
|
@@ -181,6 +181,14 @@ class InvoiceGenerator {
|
|
|
181
181
|
},
|
|
182
182
|
description: 'A JSON array of invoice items. E.g., [{"description":"Item 1","quantity":2,"unitPrice":50}]',
|
|
183
183
|
},
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Output Filename',
|
|
186
|
+
name: 'outputFilename',
|
|
187
|
+
type: 'string',
|
|
188
|
+
default: 'Invoice.pdf',
|
|
189
|
+
description: 'Name for the generated PDF file (include .pdf extension)',
|
|
190
|
+
required: false,
|
|
191
|
+
},
|
|
184
192
|
],
|
|
185
193
|
};
|
|
186
194
|
}
|
|
@@ -274,7 +282,8 @@ class InvoiceGenerator {
|
|
|
274
282
|
});
|
|
275
283
|
continue;
|
|
276
284
|
}
|
|
277
|
-
const
|
|
285
|
+
const outputFilename = this.getNodeParameter('outputFilename', i, 'Invoice.pdf');
|
|
286
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
278
287
|
returnData.push({
|
|
279
288
|
json: items[i].json,
|
|
280
289
|
binary: {
|
|
@@ -47,6 +47,14 @@ class MergePdfs {
|
|
|
47
47
|
description: "The field names for binary PDF file or urls that indicate PDF files. Please make sure the size of PDf file doesn't exceed 6mb. If it's bigger, pass an array of URLs rather than binary file.",
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
displayName: "Output Filename",
|
|
52
|
+
name: "outputFilename",
|
|
53
|
+
type: "string",
|
|
54
|
+
default: "output.pdf",
|
|
55
|
+
description: "Name for the generated PDF file (include .pdf extension)",
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
50
58
|
],
|
|
51
59
|
};
|
|
52
60
|
}
|
|
@@ -92,7 +100,8 @@ class MergePdfs {
|
|
|
92
100
|
});
|
|
93
101
|
return [returnData];
|
|
94
102
|
}
|
|
95
|
-
const
|
|
103
|
+
const outputFilename = this.getNodeParameter("outputFilename", 0, "output.pdf");
|
|
104
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
96
105
|
returnData.push({
|
|
97
106
|
json: {},
|
|
98
107
|
binary: {
|
|
@@ -75,6 +75,14 @@ class PdfFormFill {
|
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
displayName: "Output Filename",
|
|
80
|
+
name: "outputFilename",
|
|
81
|
+
type: "string",
|
|
82
|
+
default: "document.pdf",
|
|
83
|
+
description: "Name for the generated PDF file (include .pdf extension)",
|
|
84
|
+
required: false,
|
|
85
|
+
},
|
|
78
86
|
],
|
|
79
87
|
};
|
|
80
88
|
}
|
|
@@ -132,7 +140,8 @@ class PdfFormFill {
|
|
|
132
140
|
});
|
|
133
141
|
continue;
|
|
134
142
|
}
|
|
135
|
-
const
|
|
143
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "document.pdf");
|
|
144
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
136
145
|
returnData.push({
|
|
137
146
|
json: items[i].json,
|
|
138
147
|
binary: {
|
|
@@ -47,6 +47,14 @@ class PdfToPng {
|
|
|
47
47
|
description: "The field name for binary PDF file or url that indicates PDF file. Please make sure the size of PDf file doesn't exceed 6mb. If it's bigger, pass URL rather than binary file.",
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
displayName: "Output Filename",
|
|
52
|
+
name: "outputFilename",
|
|
53
|
+
type: "string",
|
|
54
|
+
default: "output.png",
|
|
55
|
+
description: "Name for the generated PNG file (include .png extension)",
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
50
58
|
],
|
|
51
59
|
};
|
|
52
60
|
}
|
|
@@ -100,7 +108,8 @@ class PdfToPng {
|
|
|
100
108
|
});
|
|
101
109
|
continue;
|
|
102
110
|
}
|
|
103
|
-
const
|
|
111
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.png");
|
|
112
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
104
113
|
returnData.push({
|
|
105
114
|
json: items[i].json,
|
|
106
115
|
binary: {
|
|
@@ -111,6 +111,19 @@ class Scraper {
|
|
|
111
111
|
description: "Specify if the operation should be canceled when the element is not found.",
|
|
112
112
|
required: true,
|
|
113
113
|
},
|
|
114
|
+
{
|
|
115
|
+
displayName: "Output Filename",
|
|
116
|
+
name: "outputFilename",
|
|
117
|
+
type: "string",
|
|
118
|
+
default: "output.png",
|
|
119
|
+
description: "Name for the generated PNG file (include .png extension)",
|
|
120
|
+
required: false,
|
|
121
|
+
displayOptions: {
|
|
122
|
+
show: {
|
|
123
|
+
returnValueType: ["binary"],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
114
127
|
],
|
|
115
128
|
};
|
|
116
129
|
}
|
|
@@ -161,7 +174,8 @@ class Scraper {
|
|
|
161
174
|
});
|
|
162
175
|
continue;
|
|
163
176
|
}
|
|
164
|
-
const
|
|
177
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.png");
|
|
178
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
165
179
|
returnData.push({
|
|
166
180
|
json: items[i].json,
|
|
167
181
|
binary: {
|
|
@@ -31,6 +31,14 @@ class WebsiteScreenshot {
|
|
|
31
31
|
description: "The url for taking screenshot",
|
|
32
32
|
required: true,
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
displayName: "Output Filename",
|
|
36
|
+
name: "outputFilename",
|
|
37
|
+
type: "string",
|
|
38
|
+
default: "output.png",
|
|
39
|
+
description: "Name for the generated PNG file (include .png extension)",
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
34
42
|
],
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -66,7 +74,8 @@ class WebsiteScreenshot {
|
|
|
66
74
|
});
|
|
67
75
|
continue;
|
|
68
76
|
}
|
|
69
|
-
const
|
|
77
|
+
const outputFilename = this.getNodeParameter("outputFilename", i, "output.png");
|
|
78
|
+
const binaryData = await this.helpers.prepareBinaryData(response, outputFilename);
|
|
70
79
|
returnData.push({
|
|
71
80
|
json: items[i].json,
|
|
72
81
|
binary: {
|