@apdf/n8n-nodes-apdf 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +279 -2
- package/dist/credentials/ApdfApi.credentials.d.ts +11 -0
- package/dist/credentials/ApdfApi.credentials.js +53 -0
- package/dist/credentials/ApdfApi.credentials.js.map +1 -0
- package/dist/credentials/apdf.dark.svg +7 -0
- package/dist/credentials/apdf.svg +8 -0
- package/dist/nodes/Apdf/Apdf.node.d.ts +9 -0
- package/dist/nodes/Apdf/Apdf.node.js +102 -0
- package/dist/nodes/Apdf/Apdf.node.js.map +1 -0
- package/dist/nodes/Apdf/Apdf.node.json +34 -0
- package/dist/nodes/Apdf/ApdfTrigger.node.d.ts +12 -0
- package/dist/nodes/Apdf/ApdfTrigger.node.js +194 -0
- package/dist/nodes/Apdf/ApdfTrigger.node.js.map +1 -0
- package/dist/nodes/Apdf/ApdfTrigger.node.json +34 -0
- package/dist/nodes/Apdf/apdf.dark.svg +7 -0
- package/dist/nodes/Apdf/apdf.svg +8 -0
- package/dist/nodes/Apdf/descriptions/AnalyticsDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/AnalyticsDescription.js +87 -0
- package/dist/nodes/Apdf/descriptions/AnalyticsDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/AutomationDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/AutomationDescription.js +234 -0
- package/dist/nodes/Apdf/descriptions/AutomationDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/DocumentDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/DocumentDescription.js +145 -0
- package/dist/nodes/Apdf/descriptions/DocumentDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/JobDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/JobDescription.js +40 -0
- package/dist/nodes/Apdf/descriptions/JobDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/LinkDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/LinkDescription.js +114 -0
- package/dist/nodes/Apdf/descriptions/LinkDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/PdfDescription.d.ts +3 -0
- package/dist/nodes/Apdf/descriptions/PdfDescription.js +722 -0
- package/dist/nodes/Apdf/descriptions/PdfDescription.js.map +1 -0
- package/dist/nodes/Apdf/descriptions/index.d.ts +6 -0
- package/dist/nodes/Apdf/descriptions/index.js +23 -0
- package/dist/nodes/Apdf/descriptions/index.js.map +1 -0
- package/dist/nodes/shared/display.d.ts +2 -0
- package/dist/nodes/shared/display.js +13 -0
- package/dist/nodes/shared/display.js.map +1 -0
- package/dist/nodes/shared/events.d.ts +3 -0
- package/dist/nodes/shared/events.js +57 -0
- package/dist/nodes/shared/events.js.map +1 -0
- package/dist/nodes/shared/fields.d.ts +4 -0
- package/dist/nodes/shared/fields.js +66 -0
- package/dist/nodes/shared/fields.js.map +1 -0
- package/dist/nodes/shared/output.d.ts +9 -0
- package/dist/nodes/shared/output.js +72 -0
- package/dist/nodes/shared/output.js.map +1 -0
- package/dist/nodes/shared/pagination.d.ts +2 -0
- package/dist/nodes/shared/pagination.js +60 -0
- package/dist/nodes/shared/pagination.js.map +1 -0
- package/dist/nodes/shared/transport.d.ts +9 -0
- package/dist/nodes/shared/transport.js +39 -0
- package/dist/nodes/shared/transport.js.map +1 -0
- package/dist/package.json +66 -0
- package/package.json +65 -5
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pdfFields = exports.pdfOperations = void 0;
|
|
4
|
+
const display_1 = require("../../shared/display");
|
|
5
|
+
const fields_1 = require("../../shared/fields");
|
|
6
|
+
const output_1 = require("../../shared/output");
|
|
7
|
+
const singleFileOperations = [
|
|
8
|
+
'addSecurity',
|
|
9
|
+
'compress',
|
|
10
|
+
'deletePages',
|
|
11
|
+
'extractPages',
|
|
12
|
+
'ocrConvert',
|
|
13
|
+
'ocrRead',
|
|
14
|
+
'ocrSearch',
|
|
15
|
+
'overlay',
|
|
16
|
+
'read',
|
|
17
|
+
'readMetadata',
|
|
18
|
+
'removeSecurity',
|
|
19
|
+
'rotate',
|
|
20
|
+
'search',
|
|
21
|
+
'split',
|
|
22
|
+
'toImage',
|
|
23
|
+
'underlay',
|
|
24
|
+
];
|
|
25
|
+
const alwaysAsyncOperations = [
|
|
26
|
+
'compress',
|
|
27
|
+
'convert',
|
|
28
|
+
'create',
|
|
29
|
+
'ocrConvert',
|
|
30
|
+
'ocrRead',
|
|
31
|
+
'ocrSearch',
|
|
32
|
+
'toImage',
|
|
33
|
+
];
|
|
34
|
+
const optionalAsyncOperations = [
|
|
35
|
+
'addSecurity',
|
|
36
|
+
'deletePages',
|
|
37
|
+
'extractPages',
|
|
38
|
+
'merge',
|
|
39
|
+
'overlay',
|
|
40
|
+
'read',
|
|
41
|
+
'readMetadata',
|
|
42
|
+
'removeSecurity',
|
|
43
|
+
'rotate',
|
|
44
|
+
'search',
|
|
45
|
+
'split',
|
|
46
|
+
'underlay',
|
|
47
|
+
];
|
|
48
|
+
const asyncOption = (displayOptions) => ({
|
|
49
|
+
displayName: 'Run Asynchronously',
|
|
50
|
+
name: 'async',
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
default: false,
|
|
53
|
+
description: 'Whether to return a job ID immediately instead of waiting for the result',
|
|
54
|
+
...(displayOptions ? { displayOptions } : {}),
|
|
55
|
+
routing: { send: { type: 'body', property: 'async' } },
|
|
56
|
+
});
|
|
57
|
+
const webhookUrlOption = (alwaysAsync = false) => ({
|
|
58
|
+
displayName: 'Webhook URL',
|
|
59
|
+
name: 'webhook_url',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: '',
|
|
62
|
+
description: alwaysAsync
|
|
63
|
+
? 'Called when the job finishes, instead of polling Check Status'
|
|
64
|
+
: 'Called when an asynchronous job finishes',
|
|
65
|
+
routing: { send: { type: 'body', property: 'webhook_url' } },
|
|
66
|
+
});
|
|
67
|
+
exports.pdfOperations = [
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Operation',
|
|
70
|
+
name: 'operation',
|
|
71
|
+
type: 'options',
|
|
72
|
+
noDataExpression: true,
|
|
73
|
+
displayOptions: (0, display_1.showFor)('pdf'),
|
|
74
|
+
options: [
|
|
75
|
+
{
|
|
76
|
+
name: 'Add Security',
|
|
77
|
+
value: 'addSecurity',
|
|
78
|
+
action: 'Add PDF security',
|
|
79
|
+
description: 'Password-protect a PDF and set its permissions',
|
|
80
|
+
routing: {
|
|
81
|
+
request: { method: 'POST', url: '/pdf/security/add' },
|
|
82
|
+
output: output_1.rawOutput,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'Compress',
|
|
87
|
+
value: 'compress',
|
|
88
|
+
action: 'Compress PDF',
|
|
89
|
+
description: 'Reduce the file size of a PDF. Always runs asynchronously.',
|
|
90
|
+
routing: {
|
|
91
|
+
request: { method: 'POST', url: '/pdf/file/compress' },
|
|
92
|
+
output: output_1.rawOutput,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'Convert From Office',
|
|
97
|
+
value: 'convert',
|
|
98
|
+
action: 'Convert DOC/XLS/PPT to PDF',
|
|
99
|
+
description: 'Turn a Word, Excel, PowerPoint, OpenDocument or RTF file into a PDF. Always runs asynchronously.',
|
|
100
|
+
routing: {
|
|
101
|
+
request: { method: 'POST', url: '/pdf/file/convert' },
|
|
102
|
+
output: output_1.rawOutput,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'Convert to Image',
|
|
107
|
+
value: 'toImage',
|
|
108
|
+
action: 'Convert PDF to image',
|
|
109
|
+
description: 'Render pages as PNG, JPEG or TIFF. Always runs asynchronously.',
|
|
110
|
+
routing: {
|
|
111
|
+
request: { method: 'POST', url: '/pdf/file/to-image' },
|
|
112
|
+
output: output_1.rawOutput,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'Create From HTML',
|
|
117
|
+
value: 'create',
|
|
118
|
+
action: 'Create PDF from HTML',
|
|
119
|
+
description: 'Render HTML into a PDF. Always runs asynchronously.',
|
|
120
|
+
routing: {
|
|
121
|
+
request: { method: 'POST', url: '/pdf/file/create' },
|
|
122
|
+
output: output_1.rawOutput,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'Delete Pages',
|
|
127
|
+
value: 'deletePages',
|
|
128
|
+
action: 'Delete PDF pages',
|
|
129
|
+
description: 'Return the PDF without the given pages. The source file is not changed.',
|
|
130
|
+
routing: {
|
|
131
|
+
request: { method: 'POST', url: '/pdf/page/delete' },
|
|
132
|
+
output: output_1.rawOutput,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'Extract Pages',
|
|
137
|
+
value: 'extractPages',
|
|
138
|
+
action: 'Extract PDF pages',
|
|
139
|
+
description: 'Return only the given pages as a new PDF',
|
|
140
|
+
routing: {
|
|
141
|
+
request: { method: 'POST', url: '/pdf/page/extract' },
|
|
142
|
+
output: output_1.rawOutput,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'Merge',
|
|
147
|
+
value: 'merge',
|
|
148
|
+
action: 'Merge PDF files',
|
|
149
|
+
description: 'Join several PDFs, optionally taking only some pages of each',
|
|
150
|
+
routing: {
|
|
151
|
+
request: { method: 'POST', url: '/pdf/file/merge' },
|
|
152
|
+
output: output_1.rawOutput,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'OCR Convert',
|
|
157
|
+
value: 'ocrConvert',
|
|
158
|
+
action: 'Convert PDF with OCR',
|
|
159
|
+
description: 'Add a searchable text layer to a scanned PDF. Always runs asynchronously.',
|
|
160
|
+
routing: {
|
|
161
|
+
request: { method: 'POST', url: '/pdf/ocr/convert' },
|
|
162
|
+
output: output_1.rawOutput,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'OCR Read Content',
|
|
167
|
+
value: 'ocrRead',
|
|
168
|
+
action: 'Read PDF content with OCR',
|
|
169
|
+
description: 'Extract text from a scanned PDF. Always runs asynchronously.',
|
|
170
|
+
routing: {
|
|
171
|
+
request: { method: 'POST', url: '/pdf/ocr/read' },
|
|
172
|
+
output: output_1.rawOutput,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'OCR Search Content',
|
|
177
|
+
value: 'ocrSearch',
|
|
178
|
+
action: 'Search PDF content with OCR',
|
|
179
|
+
description: 'Find text in a scanned PDF. Always runs asynchronously.',
|
|
180
|
+
routing: {
|
|
181
|
+
request: { method: 'POST', url: '/pdf/ocr/search' },
|
|
182
|
+
output: output_1.rawOutput,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'Overlay Pages',
|
|
187
|
+
value: 'overlay',
|
|
188
|
+
action: 'Overlay PDF pages',
|
|
189
|
+
description: 'Stamp another PDF on top of the pages, for a watermark or letterhead',
|
|
190
|
+
routing: {
|
|
191
|
+
request: { method: 'POST', url: '/pdf/page/overlay' },
|
|
192
|
+
output: output_1.rawOutput,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: 'Read Content',
|
|
197
|
+
value: 'read',
|
|
198
|
+
action: 'Read PDF content',
|
|
199
|
+
description: 'Extract the text of a PDF that already has a text layer',
|
|
200
|
+
routing: {
|
|
201
|
+
request: { method: 'POST', url: '/pdf/content/read' },
|
|
202
|
+
output: output_1.rawOutput,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'Read Metadata',
|
|
207
|
+
value: 'readMetadata',
|
|
208
|
+
action: 'Read PDF metadata',
|
|
209
|
+
description: 'Get the page count, dimensions and document properties',
|
|
210
|
+
routing: {
|
|
211
|
+
request: { method: 'POST', url: '/pdf/metadata/read' },
|
|
212
|
+
output: output_1.rawOutput,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'Remove Security',
|
|
217
|
+
value: 'removeSecurity',
|
|
218
|
+
action: 'Remove PDF security',
|
|
219
|
+
description: 'Return an unprotected copy of a password-protected PDF',
|
|
220
|
+
routing: {
|
|
221
|
+
request: { method: 'POST', url: '/pdf/security/remove' },
|
|
222
|
+
output: output_1.rawOutput,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'Rotate Pages',
|
|
227
|
+
value: 'rotate',
|
|
228
|
+
action: 'Rotate PDF pages',
|
|
229
|
+
description: 'Turn pages by 90, 180 or 270 degrees',
|
|
230
|
+
routing: {
|
|
231
|
+
request: { method: 'POST', url: '/pdf/page/rotate' },
|
|
232
|
+
output: output_1.rawOutput,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'Search Content',
|
|
237
|
+
value: 'search',
|
|
238
|
+
action: 'Search PDF content',
|
|
239
|
+
description: 'Find text and get the pages and positions it appears on',
|
|
240
|
+
routing: {
|
|
241
|
+
request: { method: 'POST', url: '/pdf/content/search' },
|
|
242
|
+
output: output_1.rawOutput,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'Split',
|
|
247
|
+
value: 'split',
|
|
248
|
+
action: 'Split PDF',
|
|
249
|
+
description: 'Break a PDF into several files at the given page boundaries',
|
|
250
|
+
routing: {
|
|
251
|
+
request: { method: 'POST', url: '/pdf/file/split' },
|
|
252
|
+
output: output_1.rawOutput,
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: 'Underlay Pages',
|
|
257
|
+
value: 'underlay',
|
|
258
|
+
action: 'Underlay PDF pages',
|
|
259
|
+
description: 'Place another PDF behind the pages, for a background or template',
|
|
260
|
+
routing: {
|
|
261
|
+
request: { method: 'POST', url: '/pdf/page/underlay' },
|
|
262
|
+
output: output_1.rawOutput,
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
default: 'merge',
|
|
267
|
+
},
|
|
268
|
+
];
|
|
269
|
+
exports.pdfFields = [
|
|
270
|
+
{
|
|
271
|
+
displayName: 'File URL',
|
|
272
|
+
name: 'file',
|
|
273
|
+
type: 'string',
|
|
274
|
+
default: '',
|
|
275
|
+
required: true,
|
|
276
|
+
displayOptions: (0, display_1.showFor)('pdf', singleFileOperations),
|
|
277
|
+
description: 'Publicly reachable URL of the source PDF',
|
|
278
|
+
routing: { send: { type: 'body', property: 'file' } },
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
displayName: 'File URL',
|
|
282
|
+
name: 'file',
|
|
283
|
+
type: 'string',
|
|
284
|
+
default: '',
|
|
285
|
+
required: true,
|
|
286
|
+
displayOptions: (0, display_1.showFor)('pdf', ['convert']),
|
|
287
|
+
description: 'Publicly reachable URL of the Office file: docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp or rtf',
|
|
288
|
+
routing: { send: { type: 'body', property: 'file' } },
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
displayName: 'HTML',
|
|
292
|
+
name: 'html',
|
|
293
|
+
type: 'string',
|
|
294
|
+
typeOptions: { rows: 6 },
|
|
295
|
+
default: '',
|
|
296
|
+
required: true,
|
|
297
|
+
displayOptions: (0, display_1.showFor)('pdf', ['create']),
|
|
298
|
+
description: 'The HTML to render into a PDF',
|
|
299
|
+
routing: { send: { type: 'body', property: 'html' } },
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
displayName: 'Files',
|
|
303
|
+
name: 'filesUi',
|
|
304
|
+
type: 'fixedCollection',
|
|
305
|
+
typeOptions: { multipleValues: true },
|
|
306
|
+
default: {},
|
|
307
|
+
required: true,
|
|
308
|
+
placeholder: 'Add file',
|
|
309
|
+
displayOptions: (0, display_1.showFor)('pdf', ['merge']),
|
|
310
|
+
description: 'The PDFs to join, in the order they should appear',
|
|
311
|
+
options: [
|
|
312
|
+
{
|
|
313
|
+
displayName: 'File',
|
|
314
|
+
name: 'file',
|
|
315
|
+
values: [
|
|
316
|
+
{
|
|
317
|
+
displayName: 'File URL',
|
|
318
|
+
name: 'file',
|
|
319
|
+
type: 'string',
|
|
320
|
+
default: '',
|
|
321
|
+
required: true,
|
|
322
|
+
description: 'Publicly reachable URL of the PDF',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
displayName: 'Pages',
|
|
326
|
+
name: 'pages',
|
|
327
|
+
type: 'string',
|
|
328
|
+
default: '',
|
|
329
|
+
description: 'Optional subset of pages to take from this file. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
routing: {
|
|
335
|
+
send: { type: 'body', property: 'files', value: '={{ $parameter.filesUi.file }}' },
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
displayName: 'Rotations',
|
|
340
|
+
name: 'rotationsUi',
|
|
341
|
+
type: 'fixedCollection',
|
|
342
|
+
typeOptions: { multipleValues: true },
|
|
343
|
+
default: {},
|
|
344
|
+
required: true,
|
|
345
|
+
placeholder: 'Add rotation',
|
|
346
|
+
displayOptions: (0, display_1.showFor)('pdf', ['rotate']),
|
|
347
|
+
description: 'One entry per rotation to apply',
|
|
348
|
+
options: [
|
|
349
|
+
{
|
|
350
|
+
displayName: 'Rotation',
|
|
351
|
+
name: 'rotation',
|
|
352
|
+
values: [
|
|
353
|
+
{
|
|
354
|
+
displayName: 'Angle',
|
|
355
|
+
name: 'angle',
|
|
356
|
+
type: 'options',
|
|
357
|
+
default: '90',
|
|
358
|
+
required: true,
|
|
359
|
+
description: 'How far to turn the pages, clockwise',
|
|
360
|
+
options: [
|
|
361
|
+
{ name: '90°', value: '90' },
|
|
362
|
+
{ name: '180°', value: '180' },
|
|
363
|
+
{ name: '270°', value: '270' },
|
|
364
|
+
{ name: '0° (Reset)', value: '0' },
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
displayName: 'Pages',
|
|
369
|
+
name: 'pages',
|
|
370
|
+
type: 'string',
|
|
371
|
+
default: '',
|
|
372
|
+
description: 'Which pages to turn. Leave empty for every page. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
},
|
|
376
|
+
],
|
|
377
|
+
routing: {
|
|
378
|
+
send: {
|
|
379
|
+
type: 'body',
|
|
380
|
+
property: 'rotations',
|
|
381
|
+
value: '={{ $parameter.rotationsUi.rotation }}',
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
displayName: 'Pages',
|
|
387
|
+
name: 'pages',
|
|
388
|
+
type: 'string',
|
|
389
|
+
default: '',
|
|
390
|
+
required: true,
|
|
391
|
+
displayOptions: (0, display_1.showFor)('pdf', ['deletePages', 'extractPages']),
|
|
392
|
+
description: 'Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
393
|
+
routing: { send: { type: 'body', property: 'pages' } },
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
displayName: 'Pages',
|
|
397
|
+
name: 'pages',
|
|
398
|
+
type: 'string',
|
|
399
|
+
default: '',
|
|
400
|
+
required: true,
|
|
401
|
+
displayOptions: (0, display_1.showFor)('pdf', ['split']),
|
|
402
|
+
description: 'Where to split. One file per comma-separated group, so 1,2-3 yields two files. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end. Or use nN to split into files of N pages each, for example n2.',
|
|
403
|
+
routing: { send: { type: 'body', property: 'pages' } },
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
displayName: 'Search Text',
|
|
407
|
+
name: 'text',
|
|
408
|
+
type: 'string',
|
|
409
|
+
default: '',
|
|
410
|
+
required: true,
|
|
411
|
+
displayOptions: (0, display_1.showFor)('pdf', ['ocrSearch', 'search']),
|
|
412
|
+
description: 'The text to look for',
|
|
413
|
+
routing: { send: { type: 'body', property: 'text' } },
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
displayName: 'Overlay File URL',
|
|
417
|
+
name: 'overlay',
|
|
418
|
+
type: 'string',
|
|
419
|
+
default: '',
|
|
420
|
+
required: true,
|
|
421
|
+
displayOptions: (0, display_1.showFor)('pdf', ['overlay']),
|
|
422
|
+
description: 'Publicly reachable URL of the PDF to stamp on top',
|
|
423
|
+
routing: { send: { type: 'body', property: 'overlay' } },
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
displayName: 'Underlay File URL',
|
|
427
|
+
name: 'underlay',
|
|
428
|
+
type: 'string',
|
|
429
|
+
default: '',
|
|
430
|
+
required: true,
|
|
431
|
+
displayOptions: (0, display_1.showFor)('pdf', ['underlay']),
|
|
432
|
+
description: 'Publicly reachable URL of the PDF to place behind',
|
|
433
|
+
routing: { send: { type: 'body', property: 'underlay' } },
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
displayName: 'Owner Password',
|
|
437
|
+
name: 'owner_password',
|
|
438
|
+
type: 'string',
|
|
439
|
+
typeOptions: { password: true },
|
|
440
|
+
default: '',
|
|
441
|
+
required: true,
|
|
442
|
+
displayOptions: (0, display_1.showFor)('pdf', ['addSecurity']),
|
|
443
|
+
description: 'Password that grants full control over the PDF, including permissions',
|
|
444
|
+
routing: { send: { type: 'body', property: 'owner_password' } },
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
displayName: 'Image Type',
|
|
448
|
+
name: 'image_type',
|
|
449
|
+
type: 'options',
|
|
450
|
+
default: 'png',
|
|
451
|
+
required: true,
|
|
452
|
+
displayOptions: (0, display_1.showFor)('pdf', ['toImage']),
|
|
453
|
+
description: 'The image format to render each page as',
|
|
454
|
+
options: [
|
|
455
|
+
{ name: 'PNG', value: 'png' },
|
|
456
|
+
{ name: 'JPEG', value: 'jpeg' },
|
|
457
|
+
{ name: 'JPEG CMYK', value: 'jpegcmyk' },
|
|
458
|
+
{ name: 'TIFF', value: 'tiff' },
|
|
459
|
+
],
|
|
460
|
+
routing: { send: { type: 'body', property: 'image_type' } },
|
|
461
|
+
},
|
|
462
|
+
(0, fields_1.optionsCollection)([
|
|
463
|
+
{
|
|
464
|
+
displayName: 'Footer',
|
|
465
|
+
name: 'footer',
|
|
466
|
+
type: 'string',
|
|
467
|
+
default: '',
|
|
468
|
+
description: 'HTML rendered as the footer of every page',
|
|
469
|
+
routing: { send: { type: 'body', property: 'footer' } },
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
displayName: 'Format',
|
|
473
|
+
name: 'format',
|
|
474
|
+
type: 'options',
|
|
475
|
+
default: 'a4',
|
|
476
|
+
description: 'Paper size. Ignored when width and height are given.',
|
|
477
|
+
options: [
|
|
478
|
+
{ name: 'A0', value: 'a0' },
|
|
479
|
+
{ name: 'A1', value: 'a1' },
|
|
480
|
+
{ name: 'A2', value: 'a2' },
|
|
481
|
+
{ name: 'A3', value: 'a3' },
|
|
482
|
+
{ name: 'A4', value: 'a4' },
|
|
483
|
+
{ name: 'A5', value: 'a5' },
|
|
484
|
+
{ name: 'A6', value: 'a6' },
|
|
485
|
+
{ name: 'Ledger', value: 'ledger' },
|
|
486
|
+
{ name: 'Legal', value: 'legal' },
|
|
487
|
+
{ name: 'Letter', value: 'letter' },
|
|
488
|
+
{ name: 'Tabloid', value: 'tabloid' },
|
|
489
|
+
],
|
|
490
|
+
routing: { send: { type: 'body', property: 'format' } },
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
displayName: 'Header',
|
|
494
|
+
name: 'header',
|
|
495
|
+
type: 'string',
|
|
496
|
+
default: '',
|
|
497
|
+
description: 'HTML rendered as the header of every page',
|
|
498
|
+
routing: { send: { type: 'body', property: 'header' } },
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
displayName: 'Height',
|
|
502
|
+
name: 'height',
|
|
503
|
+
type: 'number',
|
|
504
|
+
default: 0,
|
|
505
|
+
description: 'Custom page height. Must be set together with width.',
|
|
506
|
+
routing: { send: { type: 'body', property: 'height' } },
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
displayName: 'Margin Bottom',
|
|
510
|
+
name: 'margin_bottom',
|
|
511
|
+
type: 'number',
|
|
512
|
+
default: 0,
|
|
513
|
+
description: 'Bottom margin, in the chosen unit',
|
|
514
|
+
routing: { send: { type: 'body', property: 'margin_bottom' } },
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
displayName: 'Margin Left',
|
|
518
|
+
name: 'margin_left',
|
|
519
|
+
type: 'number',
|
|
520
|
+
default: 0,
|
|
521
|
+
description: 'Left margin, in the chosen unit',
|
|
522
|
+
routing: { send: { type: 'body', property: 'margin_left' } },
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
displayName: 'Margin Right',
|
|
526
|
+
name: 'margin_right',
|
|
527
|
+
type: 'number',
|
|
528
|
+
default: 0,
|
|
529
|
+
description: 'Right margin, in the chosen unit',
|
|
530
|
+
routing: { send: { type: 'body', property: 'margin_right' } },
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
displayName: 'Margin Top',
|
|
534
|
+
name: 'margin_top',
|
|
535
|
+
type: 'number',
|
|
536
|
+
default: 0,
|
|
537
|
+
description: 'Top margin, in the chosen unit',
|
|
538
|
+
routing: { send: { type: 'body', property: 'margin_top' } },
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
displayName: 'Orientation',
|
|
542
|
+
name: 'orientation',
|
|
543
|
+
type: 'options',
|
|
544
|
+
default: 'portrait',
|
|
545
|
+
description: 'Whether pages are taller than wide, or wider than tall',
|
|
546
|
+
options: [
|
|
547
|
+
{ name: 'Portrait', value: 'portrait' },
|
|
548
|
+
{ name: 'Landscape', value: 'landscape' },
|
|
549
|
+
],
|
|
550
|
+
routing: { send: { type: 'body', property: 'orientation' } },
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
displayName: 'Scale',
|
|
554
|
+
name: 'scale',
|
|
555
|
+
type: 'number',
|
|
556
|
+
default: 1,
|
|
557
|
+
typeOptions: { minValue: 0.1, maxValue: 2, numberPrecision: 2 },
|
|
558
|
+
description: 'Zoom applied while rendering, between 0.1 and 2',
|
|
559
|
+
routing: { send: { type: 'body', property: 'scale' } },
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
displayName: 'Unit',
|
|
563
|
+
name: 'unit',
|
|
564
|
+
type: 'options',
|
|
565
|
+
default: 'px',
|
|
566
|
+
description: 'The unit that width, height and margins are given in',
|
|
567
|
+
options: [
|
|
568
|
+
{ name: 'Centimeters', value: 'cm' },
|
|
569
|
+
{ name: 'Inches', value: 'in' },
|
|
570
|
+
{ name: 'Millimeters', value: 'mm' },
|
|
571
|
+
{ name: 'Pixels', value: 'px' },
|
|
572
|
+
],
|
|
573
|
+
routing: { send: { type: 'body', property: 'unit' } },
|
|
574
|
+
},
|
|
575
|
+
webhookUrlOption(true),
|
|
576
|
+
{
|
|
577
|
+
displayName: 'Width',
|
|
578
|
+
name: 'width',
|
|
579
|
+
type: 'number',
|
|
580
|
+
default: 0,
|
|
581
|
+
description: 'Custom page width. Must be set together with height.',
|
|
582
|
+
routing: { send: { type: 'body', property: 'width' } },
|
|
583
|
+
},
|
|
584
|
+
], (0, display_1.showFor)('pdf', ['create'])),
|
|
585
|
+
(0, fields_1.optionsCollection)([
|
|
586
|
+
{
|
|
587
|
+
displayName: 'Color Mode',
|
|
588
|
+
name: 'color_mode',
|
|
589
|
+
type: 'options',
|
|
590
|
+
default: 'color',
|
|
591
|
+
description: 'How much color information to keep',
|
|
592
|
+
options: [
|
|
593
|
+
{ name: 'Color', value: 'color' },
|
|
594
|
+
{ name: 'Grayscale', value: 'gray' },
|
|
595
|
+
{ name: 'Monochrome', value: 'mono' },
|
|
596
|
+
],
|
|
597
|
+
routing: { send: { type: 'body', property: 'color_mode' } },
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
displayName: 'DPI',
|
|
601
|
+
name: 'dpi',
|
|
602
|
+
type: 'number',
|
|
603
|
+
default: 150,
|
|
604
|
+
typeOptions: { minValue: 1, maxValue: 300 },
|
|
605
|
+
description: 'Rendering resolution, up to 300',
|
|
606
|
+
routing: { send: { type: 'body', property: 'dpi' } },
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
displayName: 'Pages',
|
|
610
|
+
name: 'pages',
|
|
611
|
+
type: 'string',
|
|
612
|
+
default: '',
|
|
613
|
+
description: 'Which pages to render. Leave empty for every page. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
614
|
+
routing: { send: { type: 'body', property: 'pages' } },
|
|
615
|
+
},
|
|
616
|
+
webhookUrlOption(true),
|
|
617
|
+
], (0, display_1.showFor)('pdf', ['toImage'])),
|
|
618
|
+
(0, fields_1.optionsCollection)([
|
|
619
|
+
{
|
|
620
|
+
displayName: 'From Page',
|
|
621
|
+
name: 'from',
|
|
622
|
+
type: 'string',
|
|
623
|
+
default: '',
|
|
624
|
+
description: 'First page to apply it to. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
625
|
+
routing: { send: { type: 'body', property: 'from' } },
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
displayName: 'Repeat',
|
|
629
|
+
name: 'repeat',
|
|
630
|
+
type: 'string',
|
|
631
|
+
default: '',
|
|
632
|
+
description: 'Which pages of the overlay or underlay file to cycle through. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
633
|
+
routing: { send: { type: 'body', property: 'repeat' } },
|
|
634
|
+
},
|
|
635
|
+
asyncOption(),
|
|
636
|
+
{
|
|
637
|
+
displayName: 'To Page',
|
|
638
|
+
name: 'to',
|
|
639
|
+
type: 'string',
|
|
640
|
+
default: '',
|
|
641
|
+
description: 'Last page to apply it to. Page numbers and ranges, for example 1,3-5. Use z for the last page and rN for the Nth page from the end.',
|
|
642
|
+
routing: { send: { type: 'body', property: 'to' } },
|
|
643
|
+
},
|
|
644
|
+
webhookUrlOption(),
|
|
645
|
+
], (0, display_1.showFor)('pdf', ['overlay', 'underlay'])),
|
|
646
|
+
(0, fields_1.optionsCollection)([
|
|
647
|
+
{
|
|
648
|
+
displayName: 'Case Sensitive',
|
|
649
|
+
name: 'case',
|
|
650
|
+
type: 'boolean',
|
|
651
|
+
default: false,
|
|
652
|
+
description: 'Whether the search must match capitalisation exactly',
|
|
653
|
+
routing: { send: { type: 'body', property: 'case' } },
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
displayName: 'Treat as Regex',
|
|
657
|
+
name: 'regex',
|
|
658
|
+
type: 'boolean',
|
|
659
|
+
default: false,
|
|
660
|
+
description: 'Whether to read the search text as a regular expression',
|
|
661
|
+
routing: { send: { type: 'body', property: 'regex' } },
|
|
662
|
+
},
|
|
663
|
+
asyncOption({ show: { '/operation': ['search'] } }),
|
|
664
|
+
webhookUrlOption(),
|
|
665
|
+
], (0, display_1.showFor)('pdf', ['ocrSearch', 'search'])),
|
|
666
|
+
(0, fields_1.optionsCollection)([
|
|
667
|
+
asyncOption(),
|
|
668
|
+
{
|
|
669
|
+
displayName: 'User Password',
|
|
670
|
+
name: 'user_password',
|
|
671
|
+
type: 'string',
|
|
672
|
+
typeOptions: { password: true },
|
|
673
|
+
default: '',
|
|
674
|
+
description: 'Password a reader needs to open the PDF. Omit to leave it openable.',
|
|
675
|
+
routing: { send: { type: 'body', property: 'user_password' } },
|
|
676
|
+
},
|
|
677
|
+
webhookUrlOption(),
|
|
678
|
+
], (0, display_1.showFor)('pdf', ['addSecurity'])),
|
|
679
|
+
(0, fields_1.optionsCollection)([
|
|
680
|
+
{
|
|
681
|
+
displayName: 'Password',
|
|
682
|
+
name: 'password',
|
|
683
|
+
type: 'string',
|
|
684
|
+
typeOptions: { password: true },
|
|
685
|
+
default: '',
|
|
686
|
+
description: 'The password that currently opens the PDF',
|
|
687
|
+
routing: { send: { type: 'body', property: 'password' } },
|
|
688
|
+
},
|
|
689
|
+
asyncOption(),
|
|
690
|
+
webhookUrlOption(),
|
|
691
|
+
], (0, display_1.showFor)('pdf', ['removeSecurity'])),
|
|
692
|
+
(0, fields_1.optionsCollection)([
|
|
693
|
+
asyncOption(),
|
|
694
|
+
webhookUrlOption(),
|
|
695
|
+
], (0, display_1.showFor)('pdf', [
|
|
696
|
+
'deletePages',
|
|
697
|
+
'extractPages',
|
|
698
|
+
'merge',
|
|
699
|
+
'read',
|
|
700
|
+
'readMetadata',
|
|
701
|
+
'rotate',
|
|
702
|
+
'split',
|
|
703
|
+
])),
|
|
704
|
+
(0, fields_1.optionsCollection)([
|
|
705
|
+
webhookUrlOption(true),
|
|
706
|
+
], (0, display_1.showFor)('pdf', ['compress', 'convert', 'ocrConvert', 'ocrRead'])),
|
|
707
|
+
{
|
|
708
|
+
displayName: 'This Operation Always Runs Asynchronously and Returns a Job ID. Use the Job → Check Status Operation, or Set a Webhook URL, to Get the Result.',
|
|
709
|
+
name: 'asyncNotice',
|
|
710
|
+
type: 'notice',
|
|
711
|
+
default: '',
|
|
712
|
+
displayOptions: (0, display_1.showFor)('pdf', alwaysAsyncOperations),
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
displayName: 'Optional Async Operations Return a Job ID Only When Run Asynchronously Is Enabled.',
|
|
716
|
+
name: 'optionalAsyncNotice',
|
|
717
|
+
type: 'notice',
|
|
718
|
+
default: '',
|
|
719
|
+
displayOptions: (0, display_1.showFor)('pdf', optionalAsyncOperations),
|
|
720
|
+
},
|
|
721
|
+
];
|
|
722
|
+
//# sourceMappingURL=PdfDescription.js.map
|