n8n-nodes-h2i 1.0.3 → 1.0.5
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/DavixH2I/DavixH2I.node.js +515 -418
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ class DavixH2I {
|
|
|
35
35
|
name: 'resource',
|
|
36
36
|
type: 'options',
|
|
37
37
|
default: 'h2i',
|
|
38
|
+
description: 'Choose which PixLab endpoint to call (H2I, Image, PDF, or Tools). Sends action-specific parameters to that resource.',
|
|
38
39
|
options: [
|
|
39
40
|
{ name: 'H2I (HTML → Image)', value: 'h2i' },
|
|
40
41
|
{ name: 'Image (Transform / Export PDF)', value: 'image' },
|
|
@@ -49,6 +50,7 @@ class DavixH2I {
|
|
|
49
50
|
type: 'options',
|
|
50
51
|
default: 'image',
|
|
51
52
|
displayOptions: { show: { resource: ['h2i'] } },
|
|
53
|
+
description: 'Select the PixLab H2I action. The node sends action=image or action=pdf accordingly.',
|
|
52
54
|
options: [
|
|
53
55
|
{ name: 'Render HTML to Image', value: 'image' },
|
|
54
56
|
{ name: 'Render HTML to PDF', value: 'pdf' },
|
|
@@ -61,6 +63,7 @@ class DavixH2I {
|
|
|
61
63
|
type: 'options',
|
|
62
64
|
default: 'format',
|
|
63
65
|
displayOptions: { show: { resource: ['image'] } },
|
|
66
|
+
description: 'Select the PixLab Image action to run (sent as action=<value>).',
|
|
64
67
|
options: [
|
|
65
68
|
{ name: 'Format', value: 'format' },
|
|
66
69
|
{ name: 'Resize', value: 'resize' },
|
|
@@ -84,6 +87,7 @@ class DavixH2I {
|
|
|
84
87
|
type: 'options',
|
|
85
88
|
default: 'merge',
|
|
86
89
|
displayOptions: { show: { resource: ['pdf'] } },
|
|
90
|
+
description: 'Select the PixLab PDF action to run (sent as action=<value>).',
|
|
87
91
|
options: [
|
|
88
92
|
{ name: 'To Images', value: 'to-images' },
|
|
89
93
|
{ name: 'Merge', value: 'merge' },
|
|
@@ -108,6 +112,7 @@ class DavixH2I {
|
|
|
108
112
|
type: 'options',
|
|
109
113
|
default: 'single',
|
|
110
114
|
displayOptions: { show: { resource: ['tools'] } },
|
|
115
|
+
description: 'Select whether to run one tool or multiple tools in a single PixLab Tools request.',
|
|
111
116
|
options: [
|
|
112
117
|
{ name: 'Single Tool', value: 'single' },
|
|
113
118
|
{ name: 'Multitask', value: 'multitask' },
|
|
@@ -123,6 +128,8 @@ class DavixH2I {
|
|
|
123
128
|
default: '',
|
|
124
129
|
required: true,
|
|
125
130
|
typeOptions: { rows: 6 },
|
|
131
|
+
placeholder: '<div>Hello</div>',
|
|
132
|
+
description: 'HTML markup to render via PixLab H2I.',
|
|
126
133
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
127
134
|
},
|
|
128
135
|
{
|
|
@@ -131,6 +138,8 @@ class DavixH2I {
|
|
|
131
138
|
type: 'string',
|
|
132
139
|
default: '',
|
|
133
140
|
typeOptions: { rows: 4 },
|
|
141
|
+
placeholder: 'body { background: #fff; }',
|
|
142
|
+
description: 'Optional CSS styles applied to the HTML before rendering.',
|
|
134
143
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
135
144
|
},
|
|
136
145
|
{
|
|
@@ -138,6 +147,7 @@ class DavixH2I {
|
|
|
138
147
|
name: 'width',
|
|
139
148
|
type: 'number',
|
|
140
149
|
default: 1000,
|
|
150
|
+
description: 'Output width in pixels.',
|
|
141
151
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
142
152
|
},
|
|
143
153
|
{
|
|
@@ -145,6 +155,7 @@ class DavixH2I {
|
|
|
145
155
|
name: 'height',
|
|
146
156
|
type: 'number',
|
|
147
157
|
default: 1500,
|
|
158
|
+
description: 'Output height in pixels.',
|
|
148
159
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
149
160
|
},
|
|
150
161
|
{
|
|
@@ -152,6 +163,7 @@ class DavixH2I {
|
|
|
152
163
|
name: 'format',
|
|
153
164
|
type: 'options',
|
|
154
165
|
default: 'png',
|
|
166
|
+
description: 'Image format when rendering HTML to an image.',
|
|
155
167
|
options: [
|
|
156
168
|
{ name: 'PNG', value: 'png' },
|
|
157
169
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -163,6 +175,7 @@ class DavixH2I {
|
|
|
163
175
|
name: 'h2iPdfPageSize',
|
|
164
176
|
type: 'options',
|
|
165
177
|
default: 'auto',
|
|
178
|
+
description: 'Page size when rendering HTML to PDF.',
|
|
166
179
|
options: [
|
|
167
180
|
{ name: 'Auto', value: 'auto' },
|
|
168
181
|
{ name: 'A4', value: 'a4' },
|
|
@@ -175,6 +188,7 @@ class DavixH2I {
|
|
|
175
188
|
name: 'h2iPdfOrientation',
|
|
176
189
|
type: 'options',
|
|
177
190
|
default: 'portrait',
|
|
191
|
+
description: 'PDF orientation for H2I PDF output.',
|
|
178
192
|
options: [
|
|
179
193
|
{ name: 'Portrait', value: 'portrait' },
|
|
180
194
|
{ name: 'Landscape', value: 'landscape' },
|
|
@@ -186,6 +200,7 @@ class DavixH2I {
|
|
|
186
200
|
name: 'h2iPdfMargin',
|
|
187
201
|
type: 'number',
|
|
188
202
|
default: 0,
|
|
203
|
+
description: 'Page margin in pixels for H2I PDF.',
|
|
189
204
|
displayOptions: { show: { resource: ['h2i'], operation: ['pdf'] } },
|
|
190
205
|
},
|
|
191
206
|
{
|
|
@@ -193,6 +208,7 @@ class DavixH2I {
|
|
|
193
208
|
name: 'h2iPdfEmbedFormat',
|
|
194
209
|
type: 'options',
|
|
195
210
|
default: 'png',
|
|
211
|
+
description: 'Image format embedded inside the generated PDF.',
|
|
196
212
|
options: [
|
|
197
213
|
{ name: 'PNG', value: 'png' },
|
|
198
214
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -204,6 +220,7 @@ class DavixH2I {
|
|
|
204
220
|
name: 'h2iPdfJpegQuality',
|
|
205
221
|
type: 'number',
|
|
206
222
|
default: 85,
|
|
223
|
+
description: 'JPEG quality used when embedding images into the PDF.',
|
|
207
224
|
displayOptions: { show: { resource: ['h2i'], operation: ['pdf'] } },
|
|
208
225
|
},
|
|
209
226
|
{
|
|
@@ -211,6 +228,7 @@ class DavixH2I {
|
|
|
211
228
|
name: 'downloadBinary',
|
|
212
229
|
type: 'boolean',
|
|
213
230
|
default: false,
|
|
231
|
+
description: 'If enabled, downloads the first result URL into a binary property.',
|
|
214
232
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'] } },
|
|
215
233
|
},
|
|
216
234
|
{
|
|
@@ -218,6 +236,7 @@ class DavixH2I {
|
|
|
218
236
|
name: 'outputBinaryProperty',
|
|
219
237
|
type: 'string',
|
|
220
238
|
default: 'data',
|
|
239
|
+
description: 'Name of the binary property to store the downloaded file.',
|
|
221
240
|
displayOptions: { show: { resource: ['h2i'], operation: ['image', 'pdf'], downloadBinary: [true] } },
|
|
222
241
|
},
|
|
223
242
|
// -------------------------
|
|
@@ -229,7 +248,7 @@ class DavixH2I {
|
|
|
229
248
|
type: 'string',
|
|
230
249
|
default: 'data',
|
|
231
250
|
placeholder: 'data OR image1,image2',
|
|
232
|
-
description: 'Comma-separated binary
|
|
251
|
+
description: 'Comma-separated binary properties containing images to upload (e.g. data,image1). Each entry is sent as an images file.',
|
|
233
252
|
displayOptions: { show: { resource: ['image'] } },
|
|
234
253
|
},
|
|
235
254
|
{
|
|
@@ -237,6 +256,7 @@ class DavixH2I {
|
|
|
237
256
|
name: 'imageFormat',
|
|
238
257
|
type: 'options',
|
|
239
258
|
default: 'webp',
|
|
259
|
+
description: 'Output image format for non-multitask actions.',
|
|
240
260
|
options: [
|
|
241
261
|
{ name: 'JPEG', value: 'jpeg' },
|
|
242
262
|
{ name: 'PNG', value: 'png' },
|
|
@@ -248,26 +268,27 @@ class DavixH2I {
|
|
|
248
268
|
],
|
|
249
269
|
displayOptions: { show: { resource: ['image'] }, hide: { operation: ['multitask'] } },
|
|
250
270
|
},
|
|
251
|
-
{ displayName: 'Width', name: 'imageWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
252
|
-
{ displayName: 'Height', name: 'imageHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
253
|
-
{ displayName: 'Enlarge', name: 'enlarge', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['resize'] } } },
|
|
254
|
-
{ displayName: 'Normalize Orientation', name: 'normalizeOrientation', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['resize', 'crop', 'enhance', 'metadata'] } } },
|
|
255
|
-
{ displayName: 'Crop X', name: 'cropX', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
256
|
-
{ displayName: 'Crop Y', name: 'cropY', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
257
|
-
{ displayName: 'Crop Width', name: 'cropWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
258
|
-
{ displayName: 'Crop Height', name: 'cropHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
259
|
-
{ displayName: 'Background Color', name: 'backgroundColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['crop', 'compress', 'background'] } } },
|
|
260
|
-
{ displayName: 'Rotate (degrees)', name: 'rotate', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
261
|
-
{ displayName: 'Flip Horizontal', name: 'flipH', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
262
|
-
{ displayName: 'Flip Vertical', name: 'flipV', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
263
|
-
{ displayName: 'Color Space', name: 'colorSpace', type: 'options', default: 'srgb', options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }], displayOptions: { show: { resource: ['image'], operation: ['transform', 'compress'] } } },
|
|
264
|
-
{ displayName: 'Target Size (KB)', name: 'targetSizeKB', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
265
|
-
{ displayName: 'Quality', name: 'quality', type: 'number', default: 82, displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
271
|
+
{ displayName: 'Width', name: 'imageWidth', type: 'number', default: 0, description: 'Resize width in pixels (0 to auto).', displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
272
|
+
{ displayName: 'Height', name: 'imageHeight', type: 'number', default: 0, description: 'Resize height in pixels (0 to auto).', displayOptions: { show: { resource: ['image'], operation: ['resize', 'format'] } } },
|
|
273
|
+
{ displayName: 'Enlarge', name: 'enlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.', displayOptions: { show: { resource: ['image'], operation: ['resize'] } } },
|
|
274
|
+
{ displayName: 'Normalize Orientation', name: 'normalizeOrientation', type: 'boolean', default: false, description: 'Auto-rotate based on EXIF orientation.', displayOptions: { show: { resource: ['image'], operation: ['resize', 'crop', 'enhance', 'metadata'] } } },
|
|
275
|
+
{ displayName: 'Crop X', name: 'cropX', type: 'number', default: 0, description: 'Left offset for crop (requires crop width/height).', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
276
|
+
{ displayName: 'Crop Y', name: 'cropY', type: 'number', default: 0, description: 'Top offset for crop (requires crop width/height).', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
277
|
+
{ displayName: 'Crop Width', name: 'cropWidth', type: 'number', default: 0, description: 'Crop width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
278
|
+
{ displayName: 'Crop Height', name: 'cropHeight', type: 'number', default: 0, description: 'Crop height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['crop'] } } },
|
|
279
|
+
{ displayName: 'Background Color', name: 'backgroundColor', type: 'string', default: '', description: 'Background color to use for some actions (e.g. crop fill, compress, background).', displayOptions: { show: { resource: ['image'], operation: ['crop', 'compress', 'background'] } } },
|
|
280
|
+
{ displayName: 'Rotate (degrees)', name: 'rotate', type: 'number', default: 0, description: 'Rotate image by degrees.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
281
|
+
{ displayName: 'Flip Horizontal', name: 'flipH', type: 'boolean', default: false, description: 'Flip image horizontally.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
282
|
+
{ displayName: 'Flip Vertical', name: 'flipV', type: 'boolean', default: false, description: 'Flip image vertically.', displayOptions: { show: { resource: ['image'], operation: ['transform'] } } },
|
|
283
|
+
{ displayName: 'Color Space', name: 'colorSpace', type: 'options', default: 'srgb', description: 'Color space to use for transforms/compress.', options: [{ name: 'sRGB', value: 'srgb' }, { name: 'Display P3', value: 'display-p3' }], displayOptions: { show: { resource: ['image'], operation: ['transform', 'compress'] } } },
|
|
284
|
+
{ displayName: 'Target Size (KB)', name: 'targetSizeKB', type: 'number', default: 0, description: 'Target output size in KB for compression (optional).', displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
285
|
+
{ displayName: 'Quality', name: 'quality', type: 'number', default: 82, description: 'Compression quality (1-100).', displayOptions: { show: { resource: ['image'], operation: ['compress'] } } },
|
|
266
286
|
{
|
|
267
287
|
displayName: 'Keep Metadata',
|
|
268
288
|
name: 'keepMetadata',
|
|
269
289
|
type: 'boolean',
|
|
270
290
|
default: false,
|
|
291
|
+
description: 'Preserve EXIF/metadata when possible.',
|
|
271
292
|
displayOptions: {
|
|
272
293
|
show: {
|
|
273
294
|
resource: ['image'],
|
|
@@ -275,27 +296,27 @@ class DavixH2I {
|
|
|
275
296
|
},
|
|
276
297
|
},
|
|
277
298
|
},
|
|
278
|
-
{ displayName: 'Blur', name: 'blur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
279
|
-
{ displayName: 'Sharpen', name: 'sharpen', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
280
|
-
{ displayName: 'Grayscale', name: 'grayscale', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
281
|
-
{ displayName: 'Sepia', name: 'sepia', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
282
|
-
{ displayName: 'Brightness', name: 'brightness', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
283
|
-
{ displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
284
|
-
{ displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
285
|
-
{ displayName: 'Pad', name: 'pad', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame'] } } },
|
|
286
|
-
{ displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
287
|
-
{ displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
288
|
-
{ displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
289
|
-
{ displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
290
|
-
{ displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame', 'background'] } } },
|
|
291
|
-
{ displayName: 'Border', name: 'border', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
292
|
-
{ displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
293
|
-
{ displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['padding', 'background'] } } },
|
|
294
|
-
{ displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['background'] } } },
|
|
295
|
-
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
296
|
-
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
297
|
-
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
298
|
-
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
299
|
+
{ displayName: 'Blur', name: 'blur', type: 'number', default: 0, description: 'Apply blur radius (0 to skip).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
300
|
+
{ displayName: 'Sharpen', name: 'sharpen', type: 'number', default: 0, description: 'Sharpen amount (0 to skip).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
301
|
+
{ displayName: 'Grayscale', name: 'grayscale', type: 'boolean', default: false, description: 'Convert image to grayscale.', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
302
|
+
{ displayName: 'Sepia', name: 'sepia', type: 'boolean', default: false, description: 'Apply sepia tone.', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
303
|
+
{ displayName: 'Brightness', name: 'brightness', type: 'number', default: 0, description: 'Adjust brightness (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
304
|
+
{ displayName: 'Contrast', name: 'contrast', type: 'number', default: 0, description: 'Adjust contrast (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
305
|
+
{ displayName: 'Saturation', name: 'saturation', type: 'number', default: 0, description: 'Adjust saturation (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['enhance'] } } },
|
|
306
|
+
{ displayName: 'Pad', name: 'pad', type: 'number', default: 0, description: 'Uniform padding size.', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame'] } } },
|
|
307
|
+
{ displayName: 'Pad Top', name: 'padTop', type: 'number', default: 0, description: 'Top padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
308
|
+
{ displayName: 'Pad Right', name: 'padRight', type: 'number', default: 0, description: 'Right padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
309
|
+
{ displayName: 'Pad Bottom', name: 'padBottom', type: 'number', default: 0, description: 'Bottom padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
310
|
+
{ displayName: 'Pad Left', name: 'padLeft', type: 'number', default: 0, description: 'Left padding (overrides uniform pad).', displayOptions: { show: { resource: ['image'], operation: ['padding'] } } },
|
|
311
|
+
{ displayName: 'Pad Color', name: 'padColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).', displayOptions: { show: { resource: ['image'], operation: ['padding', 'frame', 'background'] } } },
|
|
312
|
+
{ displayName: 'Border', name: 'border', type: 'number', default: 0, description: 'Border thickness in pixels.', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
313
|
+
{ displayName: 'Border Color', name: 'borderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).', displayOptions: { show: { resource: ['image'], operation: ['frame'] } } },
|
|
314
|
+
{ displayName: 'Border Radius', name: 'borderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['padding', 'background'] } } },
|
|
315
|
+
{ displayName: 'Background Blur', name: 'backgroundBlur', type: 'number', default: 0, description: 'Blur background by this radius.', displayOptions: { show: { resource: ['image'], operation: ['background'] } } },
|
|
316
|
+
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Text watermark to overlay.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
317
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, description: 'Font size for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
318
|
+
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', description: 'Text watermark color.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
319
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity between 0 and 1.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
299
320
|
{
|
|
300
321
|
displayName: 'Watermark Position',
|
|
301
322
|
name: 'watermarkPosition',
|
|
@@ -308,16 +329,18 @@ class DavixH2I {
|
|
|
308
329
|
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
309
330
|
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
310
331
|
],
|
|
332
|
+
description: 'Position for text/image watermark.',
|
|
311
333
|
displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
|
|
312
334
|
},
|
|
313
|
-
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
314
|
-
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
335
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, description: 'Margin/padding around watermark.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
336
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark size.', displayOptions: { show: { resource: ['image'], operation: ['watermark'] } } },
|
|
315
337
|
{
|
|
316
338
|
displayName: 'Watermark Image Binary Property',
|
|
317
339
|
name: 'watermarkImageBinaryProp',
|
|
318
340
|
type: 'string',
|
|
319
341
|
default: '',
|
|
320
342
|
placeholder: 'watermarkImage',
|
|
343
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
321
344
|
displayOptions: { show: { resource: ['image'], operation: ['watermark'] } },
|
|
322
345
|
},
|
|
323
346
|
{
|
|
@@ -336,6 +359,7 @@ class DavixH2I {
|
|
|
336
359
|
name: 'pdfPageSize',
|
|
337
360
|
type: 'options',
|
|
338
361
|
default: 'auto',
|
|
362
|
+
description: 'Page size to use when exporting to PDF.',
|
|
339
363
|
options: [
|
|
340
364
|
{ name: 'Auto', value: 'auto' },
|
|
341
365
|
{ name: 'A4', value: 'a4' },
|
|
@@ -348,6 +372,7 @@ class DavixH2I {
|
|
|
348
372
|
name: 'pdfOrientation',
|
|
349
373
|
type: 'options',
|
|
350
374
|
default: 'portrait',
|
|
375
|
+
description: 'Orientation for pages in the exported PDF.',
|
|
351
376
|
options: [
|
|
352
377
|
{ name: 'Portrait', value: 'portrait' },
|
|
353
378
|
{ name: 'Landscape', value: 'landscape' },
|
|
@@ -359,6 +384,7 @@ class DavixH2I {
|
|
|
359
384
|
name: 'pdfMargin',
|
|
360
385
|
type: 'number',
|
|
361
386
|
default: 0,
|
|
387
|
+
description: 'Margin (in pixels) applied to the exported PDF pages.',
|
|
362
388
|
displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
|
|
363
389
|
},
|
|
364
390
|
{
|
|
@@ -366,6 +392,7 @@ class DavixH2I {
|
|
|
366
392
|
name: 'pdfEmbedFormat',
|
|
367
393
|
type: 'options',
|
|
368
394
|
default: 'png',
|
|
395
|
+
description: 'Image format embedded inside the generated PDF.',
|
|
369
396
|
options: [
|
|
370
397
|
{ name: 'PNG', value: 'png' },
|
|
371
398
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -377,55 +404,35 @@ class DavixH2I {
|
|
|
377
404
|
name: 'pdfJpegQuality',
|
|
378
405
|
type: 'number',
|
|
379
406
|
default: 85,
|
|
407
|
+
description: 'JPEG quality used when embedding images into the PDF.',
|
|
380
408
|
displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
|
|
381
409
|
},
|
|
382
|
-
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
|
|
410
|
+
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.', displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
|
|
383
411
|
{
|
|
384
|
-
displayName: '
|
|
385
|
-
name: '
|
|
412
|
+
displayName: 'Actions',
|
|
413
|
+
name: 'actions',
|
|
386
414
|
type: 'multiOptions',
|
|
387
415
|
default: [],
|
|
416
|
+
description: 'Select one or more actions to apply. Selecting an action reveals its parameters below.',
|
|
417
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
388
418
|
options: [
|
|
389
419
|
{ name: 'Format', value: 'format' },
|
|
390
|
-
{ name: '
|
|
391
|
-
{ name: 'Height', value: 'height' },
|
|
392
|
-
{ name: 'Enlarge', value: 'enlarge' },
|
|
393
|
-
{ name: 'Normalize Orientation', value: 'normalizeOrientation' },
|
|
420
|
+
{ name: 'Resize', value: 'resize' },
|
|
394
421
|
{ name: 'Crop', value: 'crop' },
|
|
395
|
-
{ name: '
|
|
396
|
-
{ name: '
|
|
397
|
-
{ name: '
|
|
398
|
-
{ name: '
|
|
399
|
-
{ name: '
|
|
400
|
-
{ name: 'Target Size (KB)', value: 'targetSizeKB' },
|
|
401
|
-
{ name: 'Quality', value: 'quality' },
|
|
402
|
-
{ name: 'Keep Metadata', value: 'keepMetadata' },
|
|
403
|
-
{ name: 'Blur', value: 'blur' },
|
|
404
|
-
{ name: 'Sharpen', value: 'sharpen' },
|
|
405
|
-
{ name: 'Grayscale', value: 'grayscale' },
|
|
406
|
-
{ name: 'Sepia', value: 'sepia' },
|
|
407
|
-
{ name: 'Brightness', value: 'brightness' },
|
|
408
|
-
{ name: 'Contrast', value: 'contrast' },
|
|
409
|
-
{ name: 'Saturation', value: 'saturation' },
|
|
410
|
-
{ name: 'Pad', value: 'pad' },
|
|
411
|
-
{ name: 'Pad Sides', value: 'padSides' },
|
|
412
|
-
{ name: 'Pad Color', value: 'padColor' },
|
|
413
|
-
{ name: 'Border', value: 'border' },
|
|
414
|
-
{ name: 'Border Color', value: 'borderColor' },
|
|
415
|
-
{ name: 'Border Radius', value: 'borderRadius' },
|
|
416
|
-
{ name: 'Background Blur', value: 'backgroundBlur' },
|
|
422
|
+
{ name: 'Transform', value: 'transform' },
|
|
423
|
+
{ name: 'Compress', value: 'compress' },
|
|
424
|
+
{ name: 'Enhance', value: 'enhance' },
|
|
425
|
+
{ name: 'Frame', value: 'frame' },
|
|
426
|
+
{ name: 'Background', value: 'background' },
|
|
417
427
|
{ name: 'Watermark', value: 'watermark' },
|
|
418
|
-
{ name: 'PDF Options', value: 'pdf' },
|
|
419
|
-
{ name: 'Include Raw EXIF', value: 'includeRawExif' },
|
|
420
428
|
],
|
|
421
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
422
429
|
},
|
|
423
|
-
// Conditional image fields for multitask
|
|
424
430
|
{
|
|
425
431
|
displayName: 'Format',
|
|
426
|
-
name: '
|
|
432
|
+
name: 'multitaskFormat',
|
|
427
433
|
type: 'options',
|
|
428
434
|
default: 'webp',
|
|
435
|
+
description: 'Output format for the multitask result.',
|
|
429
436
|
options: [
|
|
430
437
|
{ name: 'JPEG', value: 'jpeg' },
|
|
431
438
|
{ name: 'PNG', value: 'png' },
|
|
@@ -435,165 +442,204 @@ class DavixH2I {
|
|
|
435
442
|
{ name: 'SVG', value: 'svg' },
|
|
436
443
|
{ name: 'PDF', value: 'pdf' },
|
|
437
444
|
],
|
|
438
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask']
|
|
445
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
439
446
|
},
|
|
440
|
-
{ displayName: 'Width', name: 'multiWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['width'] } } },
|
|
441
|
-
{ displayName: 'Height', name: 'multiHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['height'] } } },
|
|
442
|
-
{ displayName: 'Enlarge', name: 'multiEnlarge', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['enlarge'] } } },
|
|
443
447
|
{
|
|
444
|
-
displayName: '
|
|
445
|
-
name: '
|
|
448
|
+
displayName: 'Keep Metadata',
|
|
449
|
+
name: 'multitaskKeepMetadata',
|
|
446
450
|
type: 'boolean',
|
|
447
451
|
default: false,
|
|
448
|
-
|
|
452
|
+
description: 'Preserve EXIF/metadata for the multitask request when possible.',
|
|
453
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
449
454
|
},
|
|
450
|
-
{ displayName: 'Crop X', name: 'multiCropX', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
451
|
-
{ displayName: 'Crop Y', name: 'multiCropY', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
452
|
-
{ displayName: 'Crop Width', name: 'multiCropWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
453
|
-
{ displayName: 'Crop Height', name: 'multiCropHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['crop'] } } },
|
|
454
|
-
{ displayName: 'Background Color', name: 'multiBackgroundColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundColor'] } } },
|
|
455
|
-
{ displayName: 'Rotate (degrees)', name: 'multiRotate', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['rotate'] } } },
|
|
456
|
-
{ displayName: 'Flip Horizontal', name: 'multiFlipH', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipH'] } } },
|
|
457
|
-
{ displayName: 'Flip Vertical', name: 'multiFlipV', type: 'boolean', default: false, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['flipV'] } } },
|
|
458
455
|
{
|
|
459
|
-
displayName: '
|
|
460
|
-
name: '
|
|
461
|
-
type: '
|
|
462
|
-
default: '
|
|
463
|
-
|
|
464
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'],
|
|
456
|
+
displayName: 'Format Action',
|
|
457
|
+
name: 'formatNotice',
|
|
458
|
+
type: 'notice',
|
|
459
|
+
default: '────────── Format action ──────────',
|
|
460
|
+
description: 'Parameters below apply to the Format action.',
|
|
461
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } },
|
|
465
462
|
},
|
|
466
|
-
{ displayName: '
|
|
467
|
-
{ displayName: '
|
|
463
|
+
{ displayName: 'Width', name: 'formatWidth', type: 'number', default: 0, description: 'Resize width in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
|
|
464
|
+
{ displayName: 'Height', name: 'formatHeight', type: 'number', default: 0, description: 'Resize height in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
|
|
468
465
|
{
|
|
469
|
-
displayName: '
|
|
470
|
-
name: '
|
|
466
|
+
displayName: 'Resize Action',
|
|
467
|
+
name: 'resizeNotice',
|
|
468
|
+
type: 'notice',
|
|
469
|
+
default: '────────── Resize action ──────────',
|
|
470
|
+
description: 'Parameters below apply to the Resize action.',
|
|
471
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
|
|
472
|
+
},
|
|
473
|
+
{ displayName: 'Width', name: 'resizeWidth', type: 'number', default: 0, description: 'Resize width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
474
|
+
{ displayName: 'Height', name: 'resizeHeight', type: 'number', default: 0, description: 'Resize height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
475
|
+
{ displayName: 'Enlarge', name: 'resizeEnlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
476
|
+
{
|
|
477
|
+
displayName: 'Normalize Orientation',
|
|
478
|
+
name: 'resizeNormalizeOrientation',
|
|
471
479
|
type: 'boolean',
|
|
472
480
|
default: false,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
{
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
description: 'Auto-rotate based on EXIF orientation.',
|
|
482
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
displayName: 'Crop Action',
|
|
486
|
+
name: 'cropNotice',
|
|
487
|
+
type: 'notice',
|
|
488
|
+
default: '────────── Crop action ──────────',
|
|
489
|
+
description: 'Parameters below apply to the Crop action.',
|
|
490
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
|
|
491
|
+
},
|
|
492
|
+
{ displayName: 'Crop X', name: 'cropXMulti', type: 'number', default: 0, description: 'Left offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
493
|
+
{ displayName: 'Crop Y', name: 'cropYMulti', type: 'number', default: 0, description: 'Top offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
494
|
+
{ displayName: 'Crop Width', name: 'cropWidthMulti', type: 'number', default: 0, description: 'Crop width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
495
|
+
{ displayName: 'Crop Height', name: 'cropHeightMulti', type: 'number', default: 0, description: 'Crop height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
496
|
+
{
|
|
497
|
+
displayName: 'Normalize Orientation',
|
|
498
|
+
name: 'cropNormalizeOrientation',
|
|
486
499
|
type: 'boolean',
|
|
487
500
|
default: false,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
{ displayName: 'Pad Top', name: 'multiPadTop', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
491
|
-
{ displayName: 'Pad Right', name: 'multiPadRight', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
492
|
-
{ displayName: 'Pad Bottom', name: 'multiPadBottom', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
493
|
-
{ displayName: 'Pad Left', name: 'multiPadLeft', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padSides'] } } },
|
|
494
|
-
{ displayName: 'Pad Color', name: 'multiPadColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['padColor'] } } },
|
|
495
|
-
{ displayName: 'Border', name: 'multiBorder', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['border'] } } },
|
|
496
|
-
{ displayName: 'Border Color', name: 'multiBorderColor', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderColor'] } } },
|
|
497
|
-
{ displayName: 'Border Radius', name: 'multiBorderRadius', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['borderRadius'] } } },
|
|
498
|
-
{ displayName: 'Background Blur', name: 'multiBackgroundBlur', type: 'number', default: 0, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['backgroundBlur'] } } },
|
|
499
|
-
{ displayName: 'Watermark Text', name: 'multiWatermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
500
|
-
{ displayName: 'Watermark Font Size', name: 'multiWatermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
501
|
-
{ displayName: 'Watermark Color', name: 'multiWatermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
502
|
-
{ displayName: 'Watermark Opacity', name: 'multiWatermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
503
|
-
{
|
|
504
|
-
displayName: 'Watermark Position',
|
|
505
|
-
name: 'multiWatermarkPosition',
|
|
506
|
-
type: 'options',
|
|
507
|
-
default: 'center',
|
|
508
|
-
options: [
|
|
509
|
-
{ name: 'Center', value: 'center' },
|
|
510
|
-
{ name: 'Top Left', value: 'top-left' },
|
|
511
|
-
{ name: 'Top Right', value: 'top-right' },
|
|
512
|
-
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
513
|
-
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
514
|
-
],
|
|
515
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } },
|
|
501
|
+
description: 'Auto-rotate before cropping based on EXIF orientation.',
|
|
502
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
|
|
516
503
|
},
|
|
517
|
-
{ displayName: '
|
|
518
|
-
{ displayName: 'Watermark Scale', name: 'multiWatermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['watermark'] } } },
|
|
504
|
+
{ displayName: 'Background Color', name: 'cropBackgroundColor', type: 'string', default: '', description: 'Background color used when the crop exceeds bounds.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
519
505
|
{
|
|
520
|
-
displayName: '
|
|
521
|
-
name: '
|
|
522
|
-
type: '
|
|
523
|
-
default: '',
|
|
524
|
-
|
|
506
|
+
displayName: 'Transform Action',
|
|
507
|
+
name: 'transformNotice',
|
|
508
|
+
type: 'notice',
|
|
509
|
+
default: '────────── Transform action ──────────',
|
|
510
|
+
description: 'Parameters below apply to the Transform action.',
|
|
511
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
|
|
525
512
|
},
|
|
513
|
+
{ displayName: 'Rotate (degrees)', name: 'transformRotate', type: 'number', default: 0, description: 'Rotate image by degrees.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
514
|
+
{ displayName: 'Flip Horizontal', name: 'transformFlipH', type: 'boolean', default: false, description: 'Flip image horizontally.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
515
|
+
{ displayName: 'Flip Vertical', name: 'transformFlipV', type: 'boolean', default: false, description: 'Flip image vertically.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
526
516
|
{
|
|
527
|
-
displayName: '
|
|
528
|
-
name: '
|
|
517
|
+
displayName: 'Color Space',
|
|
518
|
+
name: 'transformColorSpace',
|
|
529
519
|
type: 'options',
|
|
530
|
-
default: '
|
|
520
|
+
default: 'srgb',
|
|
521
|
+
description: 'Color space to use for transforms.',
|
|
531
522
|
options: [
|
|
532
|
-
{ name: '
|
|
533
|
-
{ name: '
|
|
523
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
524
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
534
525
|
],
|
|
535
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'],
|
|
526
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
|
|
536
527
|
},
|
|
537
528
|
{
|
|
538
|
-
displayName: '
|
|
539
|
-
name: '
|
|
540
|
-
type: '
|
|
541
|
-
default: '
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
{ name: 'A4', value: 'a4' },
|
|
545
|
-
{ name: 'Letter', value: 'letter' },
|
|
546
|
-
],
|
|
547
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
529
|
+
displayName: 'Compress Action',
|
|
530
|
+
name: 'compressNotice',
|
|
531
|
+
type: 'notice',
|
|
532
|
+
default: '────────── Compress action ──────────',
|
|
533
|
+
description: 'Parameters below apply to the Compress action.',
|
|
534
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
|
|
548
535
|
},
|
|
536
|
+
{ displayName: 'Quality', name: 'compressQuality', type: 'number', default: 82, description: 'Output quality (1-100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
537
|
+
{ displayName: 'Target Size (KB)', name: 'compressTargetSizeKB', type: 'number', default: 0, description: 'Target compressed size in KB.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
538
|
+
{ displayName: 'Background Color', name: 'compressBackgroundColor', type: 'string', default: '', description: 'Background color used for compression fills.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
549
539
|
{
|
|
550
|
-
displayName: '
|
|
551
|
-
name: '
|
|
540
|
+
displayName: 'Color Space',
|
|
541
|
+
name: 'compressColorSpace',
|
|
552
542
|
type: 'options',
|
|
553
|
-
default: '
|
|
543
|
+
default: 'srgb',
|
|
544
|
+
description: 'Color space to use for compression.',
|
|
554
545
|
options: [
|
|
555
|
-
{ name: '
|
|
556
|
-
{ name: '
|
|
546
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
547
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
557
548
|
],
|
|
558
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'],
|
|
549
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
|
|
559
550
|
},
|
|
560
551
|
{
|
|
561
|
-
displayName: '
|
|
562
|
-
name: '
|
|
563
|
-
type: '
|
|
564
|
-
default:
|
|
565
|
-
|
|
552
|
+
displayName: 'Enhance Action',
|
|
553
|
+
name: 'enhanceNotice',
|
|
554
|
+
type: 'notice',
|
|
555
|
+
default: '────────── Enhance action ──────────',
|
|
556
|
+
description: 'Parameters below apply to the Enhance action.',
|
|
557
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
|
|
566
558
|
},
|
|
559
|
+
{ displayName: 'Blur', name: 'enhanceBlur', type: 'number', default: 0, description: 'Blur radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
560
|
+
{ displayName: 'Sharpen', name: 'enhanceSharpen', type: 'number', default: 0, description: 'Sharpen amount.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
561
|
+
{ displayName: 'Grayscale', name: 'enhanceGrayscale', type: 'boolean', default: false, description: 'Convert to grayscale.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
562
|
+
{ displayName: 'Sepia', name: 'enhanceSepia', type: 'boolean', default: false, description: 'Apply sepia tone.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
563
|
+
{ displayName: 'Brightness', name: 'enhanceBrightness', type: 'number', default: 0, description: 'Brightness adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
564
|
+
{ displayName: 'Contrast', name: 'enhanceContrast', type: 'number', default: 0, description: 'Contrast adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
565
|
+
{ displayName: 'Saturation', name: 'enhanceSaturation', type: 'number', default: 0, description: 'Saturation adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
567
566
|
{
|
|
568
|
-
displayName: '
|
|
569
|
-
name: '
|
|
567
|
+
displayName: 'Normalize Orientation',
|
|
568
|
+
name: 'enhanceNormalizeOrientation',
|
|
569
|
+
type: 'boolean',
|
|
570
|
+
default: false,
|
|
571
|
+
description: 'Auto-rotate based on EXIF orientation before enhancing.',
|
|
572
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
displayName: 'Frame Action',
|
|
576
|
+
name: 'frameNotice',
|
|
577
|
+
type: 'notice',
|
|
578
|
+
default: '────────── Frame action ──────────',
|
|
579
|
+
description: 'Parameters below apply to the Frame action.',
|
|
580
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } },
|
|
581
|
+
},
|
|
582
|
+
{ displayName: 'Pad', name: 'framePad', type: 'number', default: 0, description: 'Uniform padding size.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
583
|
+
{ displayName: 'Pad Color', name: 'framePadColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
584
|
+
{ displayName: 'Border', name: 'frameBorder', type: 'number', default: 0, description: 'Border thickness in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
585
|
+
{ displayName: 'Border Color', name: 'frameBorderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
586
|
+
{ displayName: 'Border Radius', name: 'frameBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
587
|
+
{
|
|
588
|
+
displayName: 'Background Action',
|
|
589
|
+
name: 'backgroundNotice',
|
|
590
|
+
type: 'notice',
|
|
591
|
+
default: '────────── Background action ──────────',
|
|
592
|
+
description: 'Parameters below apply to the Background action.',
|
|
593
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } },
|
|
594
|
+
},
|
|
595
|
+
{ displayName: 'Background Color', name: 'backgroundColorMulti', type: 'string', default: '', description: 'Background color to apply.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
596
|
+
{ displayName: 'Background Blur', name: 'backgroundBlurMulti', type: 'number', default: 0, description: 'Blur background by this radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
597
|
+
{ displayName: 'Border Radius', name: 'backgroundBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
598
|
+
{ displayName: 'Pad Color', name: 'backgroundPadColor', type: 'string', default: '', description: 'Padding color for background.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
599
|
+
{
|
|
600
|
+
displayName: 'Watermark Action',
|
|
601
|
+
name: 'watermarkNotice',
|
|
602
|
+
type: 'notice',
|
|
603
|
+
default: '────────── Watermark action ──────────',
|
|
604
|
+
description: 'Parameters below apply to the Watermark action.',
|
|
605
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
606
|
+
},
|
|
607
|
+
{ displayName: 'Watermark Text', name: 'watermarkTextMulti', type: 'string', default: '', description: 'Text watermark content.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
608
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacityMulti', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
609
|
+
{
|
|
610
|
+
displayName: 'Watermark Position',
|
|
611
|
+
name: 'watermarkPositionMulti',
|
|
570
612
|
type: 'options',
|
|
571
|
-
default: '
|
|
613
|
+
default: 'center',
|
|
614
|
+
description: 'Placement for watermark.',
|
|
572
615
|
options: [
|
|
573
|
-
{ name: '
|
|
574
|
-
{ name: '
|
|
616
|
+
{ name: 'Center', value: 'center' },
|
|
617
|
+
{ name: 'Top Left', value: 'top-left' },
|
|
618
|
+
{ name: 'Top Right', value: 'top-right' },
|
|
619
|
+
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
620
|
+
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
575
621
|
],
|
|
576
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'],
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
displayName: 'PDF JPEG Quality',
|
|
580
|
-
name: 'multiPdfJpegQuality',
|
|
581
|
-
type: 'number',
|
|
582
|
-
default: 85,
|
|
583
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], imageMultitaskOptions: ['pdf'] } },
|
|
622
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
584
623
|
},
|
|
624
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMarginMulti', type: 'number', default: 8, description: 'Margin/padding around watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
625
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScaleMulti', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
626
|
+
{ displayName: 'Watermark Color', name: 'watermarkColorMulti', type: 'string', default: '#000000', description: 'Color for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
627
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSizeMulti', type: 'number', default: 24, description: 'Font size for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
585
628
|
{
|
|
586
|
-
displayName: '
|
|
587
|
-
name: '
|
|
588
|
-
type: '
|
|
589
|
-
default:
|
|
590
|
-
|
|
629
|
+
displayName: 'Watermark Image Binary Property',
|
|
630
|
+
name: 'watermarkBinaryPropertyMulti',
|
|
631
|
+
type: 'string',
|
|
632
|
+
default: '',
|
|
633
|
+
placeholder: 'watermarkImage',
|
|
634
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
635
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
591
636
|
},
|
|
592
637
|
{
|
|
593
638
|
displayName: 'Download Result(s) as Binary',
|
|
594
639
|
name: 'imageDownloadBinary',
|
|
595
640
|
type: 'boolean',
|
|
596
641
|
default: false,
|
|
642
|
+
description: 'Download the first returned URL into binary data (results remain in JSON).',
|
|
597
643
|
displayOptions: {
|
|
598
644
|
show: {
|
|
599
645
|
resource: ['image'],
|
|
@@ -606,6 +652,7 @@ class DavixH2I {
|
|
|
606
652
|
name: 'imageOutputBinaryProperty',
|
|
607
653
|
type: 'string',
|
|
608
654
|
default: 'data',
|
|
655
|
+
description: 'Binary property name to store the downloaded file.',
|
|
609
656
|
displayOptions: {
|
|
610
657
|
show: {
|
|
611
658
|
resource: ['image'],
|
|
@@ -631,6 +678,7 @@ class DavixH2I {
|
|
|
631
678
|
name: 'sortByName',
|
|
632
679
|
type: 'boolean',
|
|
633
680
|
default: false,
|
|
681
|
+
description: 'When merging, sort uploaded PDFs by filename before merging.',
|
|
634
682
|
displayOptions: { show: { resource: ['pdf'], operation: ['merge'] } },
|
|
635
683
|
},
|
|
636
684
|
{
|
|
@@ -639,6 +687,7 @@ class DavixH2I {
|
|
|
639
687
|
type: 'string',
|
|
640
688
|
default: '',
|
|
641
689
|
placeholder: '1-3,4-5',
|
|
690
|
+
description: 'Page ranges to keep when splitting (e.g. 1-3,5).',
|
|
642
691
|
displayOptions: { show: { resource: ['pdf'], operation: ['split'] } },
|
|
643
692
|
},
|
|
644
693
|
{
|
|
@@ -646,6 +695,7 @@ class DavixH2I {
|
|
|
646
695
|
name: 'prefix',
|
|
647
696
|
type: 'string',
|
|
648
697
|
default: 'split_',
|
|
698
|
+
description: 'Prefix for split output files.',
|
|
649
699
|
displayOptions: { show: { resource: ['pdf'], operation: ['split', 'extract'] } },
|
|
650
700
|
},
|
|
651
701
|
{
|
|
@@ -654,6 +704,7 @@ class DavixH2I {
|
|
|
654
704
|
type: 'string',
|
|
655
705
|
default: 'all',
|
|
656
706
|
placeholder: 'all OR 1-3,5,7',
|
|
707
|
+
description: 'Page selection, e.g. all or 1-3,5.',
|
|
657
708
|
displayOptions: {
|
|
658
709
|
show: { resource: ['pdf'], operation: ['to-images', 'extract-images', 'watermark', 'rotate', 'delete-pages', 'extract'] },
|
|
659
710
|
},
|
|
@@ -663,6 +714,7 @@ class DavixH2I {
|
|
|
663
714
|
name: 'toFormat',
|
|
664
715
|
type: 'options',
|
|
665
716
|
default: 'png',
|
|
717
|
+
description: 'Image format when converting PDF pages.',
|
|
666
718
|
options: [
|
|
667
719
|
{ name: 'PNG', value: 'png' },
|
|
668
720
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -670,14 +722,15 @@ class DavixH2I {
|
|
|
670
722
|
],
|
|
671
723
|
displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } },
|
|
672
724
|
},
|
|
673
|
-
{ displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
674
|
-
{ displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
675
|
-
{ displayName: 'DPI', name: 'dpi', type: 'number', default: 150, displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
725
|
+
{ displayName: 'Width', name: 'pdfWidth', type: 'number', default: 0, description: 'Resize width for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
726
|
+
{ displayName: 'Height', name: 'pdfHeight', type: 'number', default: 0, description: 'Resize height for PDF to images (optional).', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
727
|
+
{ displayName: 'DPI', name: 'dpi', type: 'number', default: 150, description: 'Rendering DPI for PDF to images.', displayOptions: { show: { resource: ['pdf'], operation: ['to-images'] } } },
|
|
676
728
|
{
|
|
677
729
|
displayName: 'Extract Image Format',
|
|
678
730
|
name: 'extractImageFormat',
|
|
679
731
|
type: 'options',
|
|
680
732
|
default: 'png',
|
|
733
|
+
description: 'Image format for extracted images.',
|
|
681
734
|
options: [
|
|
682
735
|
{ name: 'PNG', value: 'png' },
|
|
683
736
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -685,8 +738,8 @@ class DavixH2I {
|
|
|
685
738
|
],
|
|
686
739
|
displayOptions: { show: { resource: ['pdf'], operation: ['extract-images'] } },
|
|
687
740
|
},
|
|
688
|
-
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
689
|
-
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
741
|
+
{ displayName: 'Watermark Text', name: 'watermarkText', type: 'string', default: '', description: 'Optional text watermark to apply.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
742
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacity', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
690
743
|
{
|
|
691
744
|
displayName: 'Watermark Position',
|
|
692
745
|
name: 'watermarkPosition',
|
|
@@ -704,33 +757,35 @@ class DavixH2I {
|
|
|
704
757
|
{ displayName: 'Watermark Margin', name: 'watermarkMargin', type: 'number', default: 8, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
705
758
|
{ displayName: 'Watermark Font Size', name: 'watermarkFontSize', type: 'number', default: 24, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
706
759
|
{ displayName: 'Watermark Color', name: 'watermarkColor', type: 'string', default: '#000000', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
707
|
-
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
760
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScale', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } } },
|
|
708
761
|
{
|
|
709
762
|
displayName: 'Watermark Image Binary Property',
|
|
710
763
|
name: 'watermarkImageBinaryProp',
|
|
711
764
|
type: 'string',
|
|
712
765
|
default: '',
|
|
766
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
713
767
|
displayOptions: { show: { resource: ['pdf'], operation: ['watermark'] } },
|
|
714
768
|
},
|
|
715
|
-
{ displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
|
|
716
|
-
{ displayName: 'Title', name: 'title', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
717
|
-
{ displayName: 'Author', name: 'author', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
718
|
-
{ displayName: 'Subject', name: 'subject', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
719
|
-
{ displayName: 'Keywords', name: 'keywords', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
720
|
-
{ displayName: 'Creator', name: 'creator', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
721
|
-
{ displayName: 'Producer', name: 'producer', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
722
|
-
{ displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
723
|
-
{ displayName: 'Order (JSON array)', name: 'order', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['reorder'] } } },
|
|
724
|
-
{ displayName: 'Mode', name: 'mode', type: 'string', default: 'range', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
|
|
725
|
-
{ displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
|
|
726
|
-
{ displayName: 'User Password', name: 'userPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
727
|
-
{ displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
728
|
-
{ displayName: 'Password', name: 'password', type: 'string', default: '', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
|
|
769
|
+
{ displayName: 'Degrees', name: 'degrees', type: 'number', default: 0, description: 'Rotation angle in degrees.', displayOptions: { show: { resource: ['pdf'], operation: ['rotate'] } } },
|
|
770
|
+
{ displayName: 'Title', name: 'title', type: 'string', default: '', description: 'Set PDF title metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
771
|
+
{ displayName: 'Author', name: 'author', type: 'string', default: '', description: 'Set PDF author metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
772
|
+
{ displayName: 'Subject', name: 'subject', type: 'string', default: '', description: 'Set PDF subject metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
773
|
+
{ displayName: 'Keywords', name: 'keywords', type: 'string', default: '', description: 'Set PDF keywords metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
774
|
+
{ displayName: 'Creator', name: 'creator', type: 'string', default: '', description: 'Set PDF creator metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
775
|
+
{ displayName: 'Producer', name: 'producer', type: 'string', default: '', description: 'Set PDF producer metadata.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
776
|
+
{ displayName: 'Clean All Metadata', name: 'cleanAllMetadata', type: 'boolean', default: false, description: 'Remove existing metadata before applying new fields.', displayOptions: { show: { resource: ['pdf'], operation: ['metadata'] } } },
|
|
777
|
+
{ displayName: 'Order (JSON array)', name: 'order', type: 'string', default: '', description: 'JSON array describing new page order (e.g. [2,1,3]).', displayOptions: { show: { resource: ['pdf'], operation: ['reorder'] } } },
|
|
778
|
+
{ displayName: 'Mode', name: 'mode', type: 'string', default: 'range', description: 'Extraction mode (e.g. range).', displayOptions: { show: { resource: ['pdf'], operation: ['extract'] } } },
|
|
779
|
+
{ displayName: 'Flatten Forms', name: 'flattenForms', type: 'boolean', default: false, description: 'Flatten form fields into static content.', displayOptions: { show: { resource: ['pdf'], operation: ['flatten'] } } },
|
|
780
|
+
{ displayName: 'User Password', name: 'userPassword', type: 'string', default: '', description: 'User password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
781
|
+
{ displayName: 'Owner Password', name: 'ownerPassword', type: 'string', default: '', description: 'Owner password for encryption.', displayOptions: { show: { resource: ['pdf'], operation: ['encrypt'] } } },
|
|
782
|
+
{ displayName: 'Password', name: 'password', type: 'string', default: '', description: 'Password to decrypt PDF.', displayOptions: { show: { resource: ['pdf'], operation: ['decrypt'] } } },
|
|
729
783
|
{
|
|
730
784
|
displayName: 'Download Result(s) as Binary',
|
|
731
785
|
name: 'pdfDownloadBinary',
|
|
732
786
|
type: 'boolean',
|
|
733
787
|
default: false,
|
|
788
|
+
description: 'If enabled, download the first URL result into a binary property.',
|
|
734
789
|
displayOptions: { show: { resource: ['pdf'] } },
|
|
735
790
|
},
|
|
736
791
|
{
|
|
@@ -738,6 +793,7 @@ class DavixH2I {
|
|
|
738
793
|
name: 'pdfOutputBinaryProperty',
|
|
739
794
|
type: 'string',
|
|
740
795
|
default: 'data',
|
|
796
|
+
description: 'Binary property name to store downloaded PDF/image results.',
|
|
741
797
|
displayOptions: { show: { resource: ['pdf'], pdfDownloadBinary: [true] } },
|
|
742
798
|
},
|
|
743
799
|
// -------------------------
|
|
@@ -749,7 +805,7 @@ class DavixH2I {
|
|
|
749
805
|
type: 'string',
|
|
750
806
|
default: 'data',
|
|
751
807
|
placeholder: 'data OR img1,img2',
|
|
752
|
-
description: 'Comma-separated binary
|
|
808
|
+
description: 'Comma-separated binary properties containing images to analyze (sent as images files).',
|
|
753
809
|
displayOptions: { show: { resource: ['tools'] } },
|
|
754
810
|
},
|
|
755
811
|
{
|
|
@@ -757,6 +813,7 @@ class DavixH2I {
|
|
|
757
813
|
name: 'tool',
|
|
758
814
|
type: 'options',
|
|
759
815
|
default: 'metadata',
|
|
816
|
+
description: 'Single PixLab tool to run in action=single.',
|
|
760
817
|
options: [
|
|
761
818
|
{ name: 'Metadata', value: 'metadata' },
|
|
762
819
|
{ name: 'Colors', value: 'colors' },
|
|
@@ -777,6 +834,7 @@ class DavixH2I {
|
|
|
777
834
|
name: 'tools',
|
|
778
835
|
type: 'multiOptions',
|
|
779
836
|
default: ['metadata'],
|
|
837
|
+
description: 'Multiple PixLab tools to run together in action=multitask.',
|
|
780
838
|
options: [
|
|
781
839
|
{ name: 'Metadata', value: 'metadata' },
|
|
782
840
|
{ name: 'Colors', value: 'colors' },
|
|
@@ -793,38 +851,44 @@ class DavixH2I {
|
|
|
793
851
|
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
794
852
|
},
|
|
795
853
|
{
|
|
796
|
-
displayName: '
|
|
797
|
-
name: '
|
|
798
|
-
type: '
|
|
799
|
-
default:
|
|
854
|
+
displayName: 'Metadata Tool',
|
|
855
|
+
name: 'metadataToolNoticeSingle',
|
|
856
|
+
type: 'notice',
|
|
857
|
+
default: '────────── Metadata tool ──────────',
|
|
858
|
+
description: 'Parameters for the Metadata tool.',
|
|
800
859
|
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
|
|
801
860
|
},
|
|
802
861
|
{
|
|
803
862
|
displayName: 'Include Raw EXIF',
|
|
804
|
-
name: '
|
|
863
|
+
name: 'includeRawExifSingle',
|
|
805
864
|
type: 'boolean',
|
|
806
865
|
default: false,
|
|
807
|
-
|
|
866
|
+
description: 'Include raw EXIF data when available (metadata tool).',
|
|
867
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
|
|
808
868
|
},
|
|
809
869
|
{
|
|
810
|
-
displayName: 'Palette
|
|
811
|
-
name: '
|
|
812
|
-
type: '
|
|
813
|
-
default:
|
|
870
|
+
displayName: 'Palette Tool',
|
|
871
|
+
name: 'paletteToolNoticeSingle',
|
|
872
|
+
type: 'notice',
|
|
873
|
+
default: '────────── Palette tool ──────────',
|
|
874
|
+
description: 'Parameters for the Palette tool.',
|
|
814
875
|
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } },
|
|
815
876
|
},
|
|
877
|
+
{ displayName: 'Palette Size', name: 'paletteSizeSingle', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } } },
|
|
816
878
|
{
|
|
817
|
-
displayName: '
|
|
818
|
-
name: '
|
|
819
|
-
type: '
|
|
820
|
-
default:
|
|
821
|
-
|
|
879
|
+
displayName: 'Hash Tool',
|
|
880
|
+
name: 'hashToolNoticeSingle',
|
|
881
|
+
type: 'notice',
|
|
882
|
+
default: '────────── Hash tool ──────────',
|
|
883
|
+
description: 'Parameters for the Hash tool.',
|
|
884
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
|
|
822
885
|
},
|
|
823
886
|
{
|
|
824
887
|
displayName: 'Hash Type',
|
|
825
|
-
name: '
|
|
888
|
+
name: 'hashTypeSingle',
|
|
826
889
|
type: 'options',
|
|
827
890
|
default: 'phash',
|
|
891
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
828
892
|
options: [
|
|
829
893
|
{ name: 'pHash', value: 'phash' },
|
|
830
894
|
{ name: 'MD5', value: 'md5' },
|
|
@@ -833,101 +897,127 @@ class DavixH2I {
|
|
|
833
897
|
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
|
|
834
898
|
},
|
|
835
899
|
{
|
|
836
|
-
displayName: '
|
|
837
|
-
name: '
|
|
838
|
-
type: '
|
|
839
|
-
default: '
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
{ name: 'MD5', value: 'md5' },
|
|
843
|
-
{ name: 'SHA1', value: 'sha1' },
|
|
844
|
-
],
|
|
845
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
900
|
+
displayName: 'Similarity Tool',
|
|
901
|
+
name: 'similarityToolNoticeSingle',
|
|
902
|
+
type: 'notice',
|
|
903
|
+
default: '────────── Similarity tool ──────────',
|
|
904
|
+
description: 'Parameters for the Similarity tool.',
|
|
905
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } },
|
|
846
906
|
},
|
|
907
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeSingle', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
|
|
908
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdSingle', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
|
|
847
909
|
{
|
|
848
|
-
displayName: 'Quality
|
|
849
|
-
name: '
|
|
850
|
-
type: '
|
|
851
|
-
default:
|
|
910
|
+
displayName: 'Quality Tool',
|
|
911
|
+
name: 'qualityToolNoticeSingle',
|
|
912
|
+
type: 'notice',
|
|
913
|
+
default: '────────── Quality tool ──────────',
|
|
914
|
+
description: 'Parameters for the Quality tool.',
|
|
852
915
|
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } },
|
|
853
916
|
},
|
|
917
|
+
{ displayName: 'Quality Sample', name: 'qualitySampleSingle', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } } },
|
|
854
918
|
{
|
|
855
|
-
displayName: '
|
|
856
|
-
name: '
|
|
857
|
-
type: '
|
|
858
|
-
default:
|
|
859
|
-
|
|
919
|
+
displayName: 'Transparency Tool',
|
|
920
|
+
name: 'transparencyToolNoticeSingle',
|
|
921
|
+
type: 'notice',
|
|
922
|
+
default: '────────── Transparency tool ──────────',
|
|
923
|
+
description: 'Parameters for the Transparency tool.',
|
|
924
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } },
|
|
860
925
|
},
|
|
926
|
+
{ displayName: 'Transparency Sample', name: 'transparencySampleSingle', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } } },
|
|
861
927
|
{
|
|
862
|
-
displayName: '
|
|
863
|
-
name: '
|
|
864
|
-
type: '
|
|
865
|
-
default:
|
|
866
|
-
|
|
928
|
+
displayName: 'Efficiency Tool',
|
|
929
|
+
name: 'efficiencyToolNoticeSingle',
|
|
930
|
+
type: 'notice',
|
|
931
|
+
default: '────────── Efficiency tool ──────────',
|
|
932
|
+
description: 'Parameters for the Efficiency tool.',
|
|
933
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } },
|
|
867
934
|
},
|
|
935
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatSingle', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
|
|
936
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualitySingle', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
|
|
868
937
|
{
|
|
869
|
-
displayName: '
|
|
870
|
-
name: '
|
|
871
|
-
type: '
|
|
872
|
-
default:
|
|
873
|
-
|
|
938
|
+
displayName: 'Metadata Tool',
|
|
939
|
+
name: 'metadataToolNoticeMulti',
|
|
940
|
+
type: 'notice',
|
|
941
|
+
default: '────────── Metadata tool ──────────',
|
|
942
|
+
description: 'Parameters for the Metadata tool.',
|
|
943
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
|
|
874
944
|
},
|
|
875
945
|
{
|
|
876
|
-
displayName: '
|
|
877
|
-
name: '
|
|
878
|
-
type: '
|
|
879
|
-
default:
|
|
880
|
-
|
|
946
|
+
displayName: 'Include Raw EXIF',
|
|
947
|
+
name: 'includeRawExifMulti',
|
|
948
|
+
type: 'boolean',
|
|
949
|
+
default: false,
|
|
950
|
+
description: 'Include raw EXIF data when available (metadata tool).',
|
|
951
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
|
|
881
952
|
},
|
|
882
953
|
{
|
|
883
|
-
displayName: '
|
|
884
|
-
name: '
|
|
885
|
-
type: '
|
|
886
|
-
default: '',
|
|
887
|
-
|
|
954
|
+
displayName: 'Palette Tool',
|
|
955
|
+
name: 'paletteToolNoticeMulti',
|
|
956
|
+
type: 'notice',
|
|
957
|
+
default: '────────── Palette tool ──────────',
|
|
958
|
+
description: 'Parameters for the Palette tool.',
|
|
959
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } },
|
|
888
960
|
},
|
|
961
|
+
{ displayName: 'Palette Size', name: 'paletteSizeMulti', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } } },
|
|
889
962
|
{
|
|
890
|
-
displayName: '
|
|
891
|
-
name: '
|
|
892
|
-
type: '
|
|
893
|
-
default:
|
|
894
|
-
|
|
963
|
+
displayName: 'Hash Tool',
|
|
964
|
+
name: 'hashToolNoticeMulti',
|
|
965
|
+
type: 'notice',
|
|
966
|
+
default: '────────── Hash tool ──────────',
|
|
967
|
+
description: 'Parameters for the Hash tool.',
|
|
968
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
895
969
|
},
|
|
896
970
|
{
|
|
897
|
-
displayName: '
|
|
898
|
-
name: '
|
|
899
|
-
type: '
|
|
900
|
-
default:
|
|
901
|
-
|
|
971
|
+
displayName: 'Hash Type',
|
|
972
|
+
name: 'hashTypeMulti',
|
|
973
|
+
type: 'options',
|
|
974
|
+
default: 'phash',
|
|
975
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
976
|
+
options: [
|
|
977
|
+
{ name: 'pHash', value: 'phash' },
|
|
978
|
+
{ name: 'MD5', value: 'md5' },
|
|
979
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
980
|
+
],
|
|
981
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
902
982
|
},
|
|
903
983
|
{
|
|
904
|
-
displayName: '
|
|
905
|
-
name: '
|
|
906
|
-
type: '
|
|
907
|
-
default: '',
|
|
908
|
-
|
|
984
|
+
displayName: 'Similarity Tool',
|
|
985
|
+
name: 'similarityToolNoticeMulti',
|
|
986
|
+
type: 'notice',
|
|
987
|
+
default: '────────── Similarity tool ──────────',
|
|
988
|
+
description: 'Parameters for the Similarity tool.',
|
|
989
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
|
|
909
990
|
},
|
|
991
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeMulti', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
|
|
992
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdMulti', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
|
|
910
993
|
{
|
|
911
|
-
displayName: '
|
|
912
|
-
name: '
|
|
913
|
-
type: '
|
|
914
|
-
default: '',
|
|
915
|
-
|
|
994
|
+
displayName: 'Quality Tool',
|
|
995
|
+
name: 'qualityToolNoticeMulti',
|
|
996
|
+
type: 'notice',
|
|
997
|
+
default: '────────── Quality tool ──────────',
|
|
998
|
+
description: 'Parameters for the Quality tool.',
|
|
999
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } },
|
|
916
1000
|
},
|
|
1001
|
+
{ displayName: 'Quality Sample', name: 'qualitySampleMulti', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } } },
|
|
917
1002
|
{
|
|
918
|
-
displayName: '
|
|
919
|
-
name: '
|
|
920
|
-
type: '
|
|
921
|
-
default:
|
|
922
|
-
|
|
1003
|
+
displayName: 'Transparency Tool',
|
|
1004
|
+
name: 'transparencyToolNoticeMulti',
|
|
1005
|
+
type: 'notice',
|
|
1006
|
+
default: '────────── Transparency tool ──────────',
|
|
1007
|
+
description: 'Parameters for the Transparency tool.',
|
|
1008
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } },
|
|
923
1009
|
},
|
|
1010
|
+
{ displayName: 'Transparency Sample', name: 'transparencySampleMulti', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } } },
|
|
924
1011
|
{
|
|
925
|
-
displayName: 'Efficiency
|
|
926
|
-
name: '
|
|
927
|
-
type: '
|
|
928
|
-
default:
|
|
1012
|
+
displayName: 'Efficiency Tool',
|
|
1013
|
+
name: 'efficiencyToolNoticeMulti',
|
|
1014
|
+
type: 'notice',
|
|
1015
|
+
default: '────────── Efficiency tool ──────────',
|
|
1016
|
+
description: 'Parameters for the Efficiency tool.',
|
|
929
1017
|
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } },
|
|
930
1018
|
},
|
|
1019
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatMulti', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
|
|
1020
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualityMulti', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
|
|
931
1021
|
],
|
|
932
1022
|
};
|
|
933
1023
|
async execute() {
|
|
@@ -1159,93 +1249,91 @@ class DavixH2I {
|
|
|
1159
1249
|
setBool('includeRawExif', this.getNodeParameter('includeRawExif', itemIndex));
|
|
1160
1250
|
break;
|
|
1161
1251
|
case 'multitask': {
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1252
|
+
const selectedActions = this.getNodeParameter('actions', itemIndex, []) || [];
|
|
1253
|
+
if (selectedActions.length === 0)
|
|
1254
|
+
throw new Error('Select at least one action for multitask.');
|
|
1255
|
+
const setNumberOnce = (name, value) => {
|
|
1256
|
+
if (value !== undefined && value !== null && value !== 0 && formData[name] === undefined)
|
|
1257
|
+
formData[name] = String(value);
|
|
1258
|
+
};
|
|
1259
|
+
const setStringOnce = (name, value) => {
|
|
1260
|
+
if (value && formData[name] === undefined)
|
|
1261
|
+
formData[name] = value;
|
|
1262
|
+
};
|
|
1263
|
+
const setBoolOnce = (name, value) => {
|
|
1264
|
+
if (value && formData[name] === undefined)
|
|
1265
|
+
formData[name] = toBoolString(value);
|
|
1266
|
+
};
|
|
1267
|
+
setStringOnce('format', this.getNodeParameter('multitaskFormat', itemIndex));
|
|
1268
|
+
setBoolOnce('keepMetadata', this.getNodeParameter('multitaskKeepMetadata', itemIndex));
|
|
1269
|
+
for (const a of selectedActions) {
|
|
1270
|
+
switch (a) {
|
|
1271
|
+
case 'format':
|
|
1272
|
+
setNumberOnce('width', this.getNodeParameter('formatWidth', itemIndex));
|
|
1273
|
+
setNumberOnce('height', this.getNodeParameter('formatHeight', itemIndex));
|
|
1274
|
+
break;
|
|
1275
|
+
case 'resize':
|
|
1276
|
+
setNumberOnce('width', this.getNodeParameter('resizeWidth', itemIndex));
|
|
1277
|
+
setNumberOnce('height', this.getNodeParameter('resizeHeight', itemIndex));
|
|
1278
|
+
setBoolOnce('enlarge', this.getNodeParameter('resizeEnlarge', itemIndex));
|
|
1279
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('resizeNormalizeOrientation', itemIndex));
|
|
1280
|
+
break;
|
|
1281
|
+
case 'crop':
|
|
1282
|
+
setNumberOnce('cropX', this.getNodeParameter('cropXMulti', itemIndex));
|
|
1283
|
+
setNumberOnce('cropY', this.getNodeParameter('cropYMulti', itemIndex));
|
|
1284
|
+
setNumberOnce('cropWidth', this.getNodeParameter('cropWidthMulti', itemIndex));
|
|
1285
|
+
setNumberOnce('cropHeight', this.getNodeParameter('cropHeightMulti', itemIndex));
|
|
1286
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('cropNormalizeOrientation', itemIndex));
|
|
1287
|
+
setStringOnce('backgroundColor', this.getNodeParameter('cropBackgroundColor', itemIndex));
|
|
1288
|
+
break;
|
|
1289
|
+
case 'transform':
|
|
1290
|
+
setNumberOnce('rotate', this.getNodeParameter('transformRotate', itemIndex));
|
|
1291
|
+
setBoolOnce('flipH', this.getNodeParameter('transformFlipH', itemIndex));
|
|
1292
|
+
setBoolOnce('flipV', this.getNodeParameter('transformFlipV', itemIndex));
|
|
1293
|
+
setStringOnce('colorSpace', this.getNodeParameter('transformColorSpace', itemIndex));
|
|
1294
|
+
break;
|
|
1295
|
+
case 'compress':
|
|
1296
|
+
setNumberOnce('quality', this.getNodeParameter('compressQuality', itemIndex));
|
|
1297
|
+
setNumberOnce('targetSizeKB', this.getNodeParameter('compressTargetSizeKB', itemIndex));
|
|
1298
|
+
setStringOnce('backgroundColor', this.getNodeParameter('compressBackgroundColor', itemIndex));
|
|
1299
|
+
setStringOnce('colorSpace', this.getNodeParameter('compressColorSpace', itemIndex));
|
|
1300
|
+
break;
|
|
1301
|
+
case 'enhance':
|
|
1302
|
+
setNumberOnce('blur', this.getNodeParameter('enhanceBlur', itemIndex));
|
|
1303
|
+
setNumberOnce('sharpen', this.getNodeParameter('enhanceSharpen', itemIndex));
|
|
1304
|
+
setBoolOnce('grayscale', this.getNodeParameter('enhanceGrayscale', itemIndex));
|
|
1305
|
+
setBoolOnce('sepia', this.getNodeParameter('enhanceSepia', itemIndex));
|
|
1306
|
+
setNumberOnce('brightness', this.getNodeParameter('enhanceBrightness', itemIndex));
|
|
1307
|
+
setNumberOnce('contrast', this.getNodeParameter('enhanceContrast', itemIndex));
|
|
1308
|
+
setNumberOnce('saturation', this.getNodeParameter('enhanceSaturation', itemIndex));
|
|
1309
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('enhanceNormalizeOrientation', itemIndex));
|
|
1310
|
+
break;
|
|
1311
|
+
case 'frame':
|
|
1312
|
+
setNumberOnce('pad', this.getNodeParameter('framePad', itemIndex));
|
|
1313
|
+
setStringOnce('padColor', this.getNodeParameter('framePadColor', itemIndex));
|
|
1314
|
+
setNumberOnce('border', this.getNodeParameter('frameBorder', itemIndex));
|
|
1315
|
+
setStringOnce('borderColor', this.getNodeParameter('frameBorderColor', itemIndex));
|
|
1316
|
+
setNumberOnce('borderRadius', this.getNodeParameter('frameBorderRadius', itemIndex));
|
|
1317
|
+
break;
|
|
1318
|
+
case 'background':
|
|
1319
|
+
setStringOnce('backgroundColor', this.getNodeParameter('backgroundColorMulti', itemIndex));
|
|
1320
|
+
setNumberOnce('backgroundBlur', this.getNodeParameter('backgroundBlurMulti', itemIndex));
|
|
1321
|
+
setNumberOnce('borderRadius', this.getNodeParameter('backgroundBorderRadius', itemIndex));
|
|
1322
|
+
setStringOnce('padColor', this.getNodeParameter('backgroundPadColor', itemIndex));
|
|
1323
|
+
break;
|
|
1324
|
+
case 'watermark':
|
|
1325
|
+
setStringOnce('watermarkText', this.getNodeParameter('watermarkTextMulti', itemIndex));
|
|
1326
|
+
setNumberOnce('watermarkOpacity', this.getNodeParameter('watermarkOpacityMulti', itemIndex));
|
|
1327
|
+
formData.watermarkPosition =
|
|
1328
|
+
formData.watermarkPosition ?? this.getNodeParameter('watermarkPositionMulti', itemIndex);
|
|
1329
|
+
setNumberOnce('watermarkMargin', this.getNodeParameter('watermarkMarginMulti', itemIndex));
|
|
1330
|
+
setNumberOnce('watermarkScale', this.getNodeParameter('watermarkScaleMulti', itemIndex));
|
|
1331
|
+
setStringOnce('watermarkColor', this.getNodeParameter('watermarkColorMulti', itemIndex));
|
|
1332
|
+
setNumberOnce('watermarkFontSize', this.getNodeParameter('watermarkFontSizeMulti', itemIndex));
|
|
1333
|
+
await includeWatermarkFile(this.getNodeParameter('watermarkBinaryPropertyMulti', itemIndex));
|
|
1334
|
+
break;
|
|
1335
|
+
}
|
|
1246
1336
|
}
|
|
1247
|
-
if (has('includeRawExif'))
|
|
1248
|
-
setBool('includeRawExif', this.getNodeParameter('multiIncludeRawExif', itemIndex));
|
|
1249
1337
|
break;
|
|
1250
1338
|
}
|
|
1251
1339
|
}
|
|
@@ -1404,54 +1492,63 @@ class DavixH2I {
|
|
|
1404
1492
|
}
|
|
1405
1493
|
const hasTool = (toolName) => selectedTools.includes(toolName);
|
|
1406
1494
|
if (hasTool('metadata')) {
|
|
1407
|
-
const
|
|
1408
|
-
? this.getNodeParameter('
|
|
1409
|
-
: this.getNodeParameter('
|
|
1410
|
-
|
|
1495
|
+
const includeRawExif = action === 'single'
|
|
1496
|
+
? this.getNodeParameter('includeRawExifSingle', itemIndex, false)
|
|
1497
|
+
: this.getNodeParameter('includeRawExifMulti', itemIndex, false);
|
|
1498
|
+
if (includeRawExif)
|
|
1499
|
+
setBool('includeRawExif', includeRawExif);
|
|
1411
1500
|
}
|
|
1412
1501
|
if (hasTool('palette')) {
|
|
1413
|
-
const
|
|
1414
|
-
? this.getNodeParameter('
|
|
1415
|
-
: this.getNodeParameter('
|
|
1416
|
-
|
|
1502
|
+
const paletteSize = action === 'single'
|
|
1503
|
+
? this.getNodeParameter('paletteSizeSingle', itemIndex, 0)
|
|
1504
|
+
: this.getNodeParameter('paletteSizeMulti', itemIndex, 0);
|
|
1505
|
+
if (paletteSize)
|
|
1506
|
+
setNumber('paletteSize', paletteSize);
|
|
1417
1507
|
}
|
|
1418
1508
|
if (hasTool('hash')) {
|
|
1419
|
-
const
|
|
1420
|
-
? this.getNodeParameter('
|
|
1421
|
-
: this.getNodeParameter('
|
|
1422
|
-
|
|
1509
|
+
const hashType = action === 'single'
|
|
1510
|
+
? this.getNodeParameter('hashTypeSingle', itemIndex)
|
|
1511
|
+
: this.getNodeParameter('hashTypeMulti', itemIndex);
|
|
1512
|
+
if (hashType)
|
|
1513
|
+
setString('hashType', hashType);
|
|
1423
1514
|
}
|
|
1424
1515
|
if (hasTool('quality')) {
|
|
1425
|
-
const
|
|
1426
|
-
? this.getNodeParameter('
|
|
1427
|
-
: this.getNodeParameter('
|
|
1428
|
-
|
|
1516
|
+
const qualitySample = action === 'single'
|
|
1517
|
+
? this.getNodeParameter('qualitySampleSingle', itemIndex, 0)
|
|
1518
|
+
: this.getNodeParameter('qualitySampleMulti', itemIndex, 0);
|
|
1519
|
+
if (qualitySample)
|
|
1520
|
+
setNumber('qualitySample', qualitySample);
|
|
1429
1521
|
}
|
|
1430
1522
|
if (hasTool('transparency')) {
|
|
1431
|
-
const
|
|
1432
|
-
? this.getNodeParameter('
|
|
1433
|
-
: this.getNodeParameter('
|
|
1434
|
-
|
|
1523
|
+
const transparencySample = action === 'single'
|
|
1524
|
+
? this.getNodeParameter('transparencySampleSingle', itemIndex, 0)
|
|
1525
|
+
: this.getNodeParameter('transparencySampleMulti', itemIndex, 0);
|
|
1526
|
+
if (transparencySample)
|
|
1527
|
+
setNumber('transparencySample', transparencySample);
|
|
1435
1528
|
}
|
|
1436
1529
|
if (hasTool('similarity')) {
|
|
1437
|
-
const
|
|
1438
|
-
? this.getNodeParameter('
|
|
1439
|
-
: this.getNodeParameter('
|
|
1440
|
-
const
|
|
1441
|
-
? this.getNodeParameter('
|
|
1442
|
-
: this.getNodeParameter('
|
|
1443
|
-
|
|
1444
|
-
|
|
1530
|
+
const similarityMode = action === 'single'
|
|
1531
|
+
? this.getNodeParameter('similarityModeSingle', itemIndex, '')
|
|
1532
|
+
: this.getNodeParameter('similarityModeMulti', itemIndex, '');
|
|
1533
|
+
const similarityThreshold = action === 'single'
|
|
1534
|
+
? this.getNodeParameter('similarityThresholdSingle', itemIndex, 0)
|
|
1535
|
+
: this.getNodeParameter('similarityThresholdMulti', itemIndex, 0);
|
|
1536
|
+
if (similarityMode)
|
|
1537
|
+
setString('similarityMode', similarityMode);
|
|
1538
|
+
if (similarityThreshold)
|
|
1539
|
+
setNumber('similarityThreshold', similarityThreshold);
|
|
1445
1540
|
}
|
|
1446
1541
|
if (hasTool('efficiency')) {
|
|
1447
|
-
const
|
|
1448
|
-
? this.getNodeParameter('
|
|
1449
|
-
: this.getNodeParameter('
|
|
1450
|
-
const
|
|
1451
|
-
? this.getNodeParameter('
|
|
1452
|
-
: this.getNodeParameter('
|
|
1453
|
-
|
|
1454
|
-
|
|
1542
|
+
const efficiencyFormat = action === 'single'
|
|
1543
|
+
? this.getNodeParameter('efficiencyFormatSingle', itemIndex, '')
|
|
1544
|
+
: this.getNodeParameter('efficiencyFormatMulti', itemIndex, '');
|
|
1545
|
+
const efficiencyQuality = action === 'single'
|
|
1546
|
+
? this.getNodeParameter('efficiencyQualitySingle', itemIndex, 0)
|
|
1547
|
+
: this.getNodeParameter('efficiencyQualityMulti', itemIndex, 0);
|
|
1548
|
+
if (efficiencyFormat)
|
|
1549
|
+
setString('efficiencyFormat', efficiencyFormat);
|
|
1550
|
+
if (efficiencyQuality)
|
|
1551
|
+
setNumber('efficiencyQuality', efficiencyQuality);
|
|
1455
1552
|
}
|
|
1456
1553
|
const response = await GenericFunctions_1.davixRequest.call(this, {
|
|
1457
1554
|
method: 'POST',
|