@cloudconvert/n8n-nodes-cloudconvert 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credentials/CloudConvertApi.credentials.js +1 -1
- package/dist/credentials/CloudConvertApi.credentials.js.map +1 -1
- package/dist/nodes/CloudConvert/CloudConvert.node.js +221 -16
- package/dist/nodes/CloudConvert/CloudConvert.node.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/command/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/command/execute.js +90 -0
- package/dist/nodes/CloudConvert/operations/command/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/command/fields.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/command/fields.js +73 -0
- package/dist/nodes/CloudConvert/operations/command/fields.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/metadata/execute.js +71 -21
- package/dist/nodes/CloudConvert/operations/metadata/execute.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/pdf/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/pdf/execute.js +112 -0
- package/dist/nodes/CloudConvert/operations/pdf/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/pdf/fields.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/pdf/fields.js +191 -0
- package/dist/nodes/CloudConvert/operations/pdf/fields.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,84 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeMetadata = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
4
5
|
const Utils_1 = require("../../Utils");
|
|
5
6
|
async function executeMetadata() {
|
|
6
7
|
var _a, _b;
|
|
7
8
|
const items = this.getInputData();
|
|
8
9
|
const returnData = [];
|
|
9
10
|
for (let i = 0; i < items.length; i++) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
const nodeOperation = this.getNodeParameter('operation', i);
|
|
12
|
+
if (nodeOperation === 'metadata') {
|
|
13
|
+
const tasks = {
|
|
14
|
+
'n8n-upload': {
|
|
15
|
+
operation: 'import/upload',
|
|
16
|
+
},
|
|
17
|
+
'n8n-process': {
|
|
18
|
+
input: 'n8n-upload',
|
|
19
|
+
operation: 'metadata',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const createdJob = await Utils_1.createJob.call(this, tasks);
|
|
23
|
+
const uploadTask = (0, Utils_1.getJobUploadTask)(createdJob);
|
|
24
|
+
if (uploadTask) {
|
|
25
|
+
await Utils_1.uploadInputFile.call(this, uploadTask, i);
|
|
26
|
+
}
|
|
27
|
+
const completedJob = await Utils_1.waitForJob.call(this, createdJob.id);
|
|
28
|
+
const metadata = (_b = (_a = completedJob.tasks.filter((task) => task.operation === 'metadata' && task.status === 'finished')[0]) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.metadata;
|
|
29
|
+
returnData.push({
|
|
30
|
+
json: metadata,
|
|
31
|
+
pairedItem: {
|
|
32
|
+
item: i,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
else if (nodeOperation === 'metadata/write') {
|
|
37
|
+
const tasks = {
|
|
38
|
+
'n8n-upload': {
|
|
39
|
+
operation: 'import/upload',
|
|
40
|
+
},
|
|
41
|
+
'n8n-process': {
|
|
42
|
+
input: 'n8n-upload',
|
|
43
|
+
operation: 'metadata/write',
|
|
44
|
+
},
|
|
45
|
+
'n8n-export': {
|
|
46
|
+
input: 'n8n-process',
|
|
47
|
+
operation: 'export/url',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
if (this.getNodeParameter('metadata', i, null)) {
|
|
51
|
+
let metadataParam = this.getNodeParameter('metadata', i);
|
|
52
|
+
try {
|
|
53
|
+
metadataParam = JSON.parse(metadataParam);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Metadata must be a valid JSON');
|
|
57
|
+
}
|
|
58
|
+
tasks['n8n-process'].metadata = metadataParam;
|
|
59
|
+
}
|
|
60
|
+
const createdJob = await Utils_1.createJob.call(this, tasks);
|
|
61
|
+
const uploadTask = (0, Utils_1.getJobUploadTask)(createdJob);
|
|
62
|
+
if (uploadTask) {
|
|
63
|
+
await Utils_1.uploadInputFile.call(this, uploadTask, i);
|
|
64
|
+
}
|
|
65
|
+
const completedJob = await Utils_1.waitForJob.call(this, createdJob.id);
|
|
66
|
+
const exportUrls = (0, Utils_1.getJobExportUrls)(completedJob);
|
|
67
|
+
for (const exportUrl of exportUrls) {
|
|
68
|
+
returnData.push({
|
|
69
|
+
json: {},
|
|
70
|
+
binary: {
|
|
71
|
+
data: await Utils_1.downloadOutputFile.call(this, exportUrl),
|
|
72
|
+
},
|
|
73
|
+
pairedItem: {
|
|
74
|
+
item: i,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported metadata operation: ${nodeOperation}`);
|
|
23
81
|
}
|
|
24
|
-
const completedJob = await Utils_1.waitForJob.call(this, createdJob.id);
|
|
25
|
-
const metadata = (_b = (_a = completedJob.tasks.filter((task) => task.operation === 'metadata' && task.status === 'finished')[0]) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.metadata;
|
|
26
|
-
returnData.push({
|
|
27
|
-
json: metadata,
|
|
28
|
-
pairedItem: {
|
|
29
|
-
item: i,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
82
|
}
|
|
33
83
|
return this.prepareOutputData(returnData);
|
|
34
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/CloudConvert/operations/metadata/execute.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/CloudConvert/operations/metadata/execute.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAElD,uCAOqB;AAEd,KAAK,UAAU,eAAe;;IACpC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,EAAE,CAAC;IAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAEtE,IAAI,aAAa,KAAK,UAAU,EAAE;YACjC,MAAM,KAAK,GAAuB;gBACjC,YAAY,EAAE;oBACb,SAAS,EAAE,eAAe;iBAC1B;gBACD,aAAa,EAAE;oBACd,KAAK,EAAE,YAAY;oBACnB,SAAS,EAAE,UAAU;iBACrB;aACD,CAAC;YAGF,MAAM,UAAU,GAAG,MAAM,iBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAErD,MAAM,UAAU,GAAG,IAAA,wBAAgB,EAAC,UAAU,CAAC,CAAC;YAEhD,IAAI,UAAU,EAAE;gBACf,MAAM,uBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;aAChD;YAED,MAAM,YAAY,GAAG,MAAM,kBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;YAEhE,MAAM,QAAQ,GAAG,MAAA,MAAA,YAAY,CAAC,KAAK,CAAC,MAAM,CACzC,CAAC,IAAI,EAAE,EA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GAAG,MAAM,kBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;YAEhE,MAAM,UAAU,GAAG,IAAA,wBAAgB,EAAC,YAAY,CAAC,CAAC;YAElD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;gBACnC,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,EAAE;oBACR,MAAM,EAAE;wBACP,IAAI,EAAE,MAAM,0BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;qBACpD;oBACD,UAAU,EAAE;wBACX,IAAI,EAAE,CAAC;qBACP;iBACD,CAAC,CAAC;aACH;SACD;aAAM;YACN,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,mCAAmC,aAAa,EAAE,CAAC,CAAC;SACjG;KACD;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AA9FD,0CA8FC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executePdfOperation = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const Utils_1 = require("../../Utils");
|
|
6
|
+
async function executePdfOperation() {
|
|
7
|
+
const items = this.getInputData();
|
|
8
|
+
const returnData = [];
|
|
9
|
+
for (let i = 0; i < items.length; i++) {
|
|
10
|
+
const nodeOperation = this.getNodeParameter('operation', i);
|
|
11
|
+
if (!nodeOperation.startsWith('pdf/')) {
|
|
12
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported PDF operation: ${nodeOperation}`);
|
|
13
|
+
}
|
|
14
|
+
const tasks = {
|
|
15
|
+
'n8n-upload': {
|
|
16
|
+
operation: 'import/upload',
|
|
17
|
+
},
|
|
18
|
+
'n8n-process': {
|
|
19
|
+
input: 'n8n-upload',
|
|
20
|
+
operation: nodeOperation,
|
|
21
|
+
},
|
|
22
|
+
'n8n-export': {
|
|
23
|
+
input: 'n8n-process',
|
|
24
|
+
operation: 'export/url',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
if (nodeOperation === 'pdf/a') {
|
|
28
|
+
const conformanceLevel = this.getNodeParameter('pdfAConformanceLevel', i, '');
|
|
29
|
+
if (conformanceLevel) {
|
|
30
|
+
tasks['n8n-process'].conformance_level = conformanceLevel;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else if (nodeOperation === 'pdf/ocr') {
|
|
34
|
+
const autoOrient = this.getNodeParameter('pdfOcrAutoOrient', i, false);
|
|
35
|
+
tasks['n8n-process'].auto_orient = autoOrient;
|
|
36
|
+
const languages = this.getNodeParameter('pdfOcrLanguages', i, '');
|
|
37
|
+
if (languages) {
|
|
38
|
+
tasks['n8n-process'].language = languages
|
|
39
|
+
.split(',')
|
|
40
|
+
.map((l) => l.trim())
|
|
41
|
+
.filter((l) => l !== '');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (nodeOperation === 'pdf/encrypt') {
|
|
45
|
+
const setPassword = this.getNodeParameter('pdfEncryptSetPassword', i, '');
|
|
46
|
+
if (setPassword) {
|
|
47
|
+
tasks['n8n-process'].set_password = setPassword;
|
|
48
|
+
}
|
|
49
|
+
const setOwnerPassword = this.getNodeParameter('pdfEncryptSetOwnerPassword', i, '');
|
|
50
|
+
if (setOwnerPassword) {
|
|
51
|
+
tasks['n8n-process'].set_owner_password = setOwnerPassword;
|
|
52
|
+
}
|
|
53
|
+
const allowExtract = this.getNodeParameter('pdfEncryptAllowExtract', i, false);
|
|
54
|
+
tasks['n8n-process'].allow_extract = allowExtract;
|
|
55
|
+
const allowAccessibility = this.getNodeParameter('pdfEncryptAllowAccessibility', i, false);
|
|
56
|
+
tasks['n8n-process'].allow_accessibility = allowAccessibility;
|
|
57
|
+
const allowModify = this.getNodeParameter('pdfEncryptAllowModify', i, '');
|
|
58
|
+
if (allowModify) {
|
|
59
|
+
tasks['n8n-process'].allow_modify = allowModify;
|
|
60
|
+
}
|
|
61
|
+
const allowPrint = this.getNodeParameter('pdfEncryptAllowPrint', i, '');
|
|
62
|
+
if (allowPrint) {
|
|
63
|
+
tasks['n8n-process'].allow_print = allowPrint;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else if (nodeOperation === 'pdf/decrypt') {
|
|
67
|
+
const password = this.getNodeParameter('pdfDecryptPassword', i, '');
|
|
68
|
+
if (password) {
|
|
69
|
+
tasks['n8n-process'].password = password;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (nodeOperation === 'pdf/split-pages') {
|
|
73
|
+
}
|
|
74
|
+
else if (nodeOperation === 'pdf/extract-pages') {
|
|
75
|
+
const pages = this.getNodeParameter('pdfExtractPagesPages', i, '');
|
|
76
|
+
if (pages) {
|
|
77
|
+
tasks['n8n-process'].pages = pages;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (nodeOperation === 'pdf/rotate-pages') {
|
|
81
|
+
const pages = this.getNodeParameter('pdfRotatePagesPages', i, '');
|
|
82
|
+
if (pages) {
|
|
83
|
+
tasks['n8n-process'].pages = pages;
|
|
84
|
+
}
|
|
85
|
+
const rotation = this.getNodeParameter('pdfRotatePagesRotation', i, '');
|
|
86
|
+
if (rotation) {
|
|
87
|
+
tasks['n8n-process'].rotation = rotation;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const createdJob = await Utils_1.createJob.call(this, tasks);
|
|
91
|
+
const uploadTask = (0, Utils_1.getJobUploadTask)(createdJob);
|
|
92
|
+
if (uploadTask) {
|
|
93
|
+
await Utils_1.uploadInputFile.call(this, uploadTask, i);
|
|
94
|
+
}
|
|
95
|
+
const completedJob = await Utils_1.waitForJob.call(this, createdJob.id);
|
|
96
|
+
const exportUrls = (0, Utils_1.getJobExportUrls)(completedJob);
|
|
97
|
+
for (const exportUrl of exportUrls) {
|
|
98
|
+
returnData.push({
|
|
99
|
+
json: {},
|
|
100
|
+
binary: {
|
|
101
|
+
data: await Utils_1.downloadOutputFile.call(this, exportUrl),
|
|
102
|
+
},
|
|
103
|
+
pairedItem: {
|
|
104
|
+
item: i,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return this.prepareOutputData(returnData);
|
|
110
|
+
}
|
|
111
|
+
exports.executePdfOperation = executePdfOperation;
|
|
112
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/CloudConvert/operations/pdf/execute.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAElD,uCAOqB;AAEd,KAAK,UAAU,mBAAmB;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAClC,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAEtE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACtC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,8BAA8B,aAAa,EAAE,CAAC,CAAC;SAC5F;QAED,MAAM,KAAK,GAAuB;YACjC,YAAY,EAAE;gBACb,SAAS,EAAE,eAAe;aAC1B;YACD,aAAa,EAAE;gBACd,KAAK,EAAE,YAAY;gBACnB,SAAS,EAAE,aAAa;aACxB;YACD,YAAY,EAAE;gBACb,KAAK,EAAE,aAAa;gBACpB,SAAS,EAAE,YAAY;aACvB;SACD,CAAC;QAGF,IAAI,aAAa,KAAK,OAAO,EAAE;YAC9B,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBA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+
{
|
|
6
|
+
displayName: 'Conformance Level',
|
|
7
|
+
name: 'pdfAConformanceLevel',
|
|
8
|
+
type: 'options',
|
|
9
|
+
default: '3b',
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
name: 'PDF/A-1B',
|
|
13
|
+
value: '1b',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'PDF/A-2B',
|
|
17
|
+
value: '2b',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'PDF/A-3B',
|
|
21
|
+
value: '3b',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
operation: ['pdf/a'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
description: 'PDF/A conformance level to convert to',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Auto Orient',
|
|
33
|
+
name: 'pdfOcrAutoOrient',
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
default: true,
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: {
|
|
38
|
+
operation: ['pdf/ocr'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
description: 'Whether to automatically detect and correct page orientation before OCR',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Languages',
|
|
45
|
+
name: 'pdfOcrLanguages',
|
|
46
|
+
type: 'string',
|
|
47
|
+
default: '',
|
|
48
|
+
placeholder: 'eng,deu',
|
|
49
|
+
displayOptions: {
|
|
50
|
+
show: {
|
|
51
|
+
operation: ['pdf/ocr'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
description: 'Comma-separated list of language codes to use for OCR, for example "eng,deu"',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Set Password',
|
|
58
|
+
name: 'pdfEncryptSetPassword',
|
|
59
|
+
type: 'string',
|
|
60
|
+
typeOptions: {
|
|
61
|
+
password: true,
|
|
62
|
+
},
|
|
63
|
+
default: '',
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
operation: ['pdf/encrypt'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
description: 'Password required to open the PDF',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Set Owner Password',
|
|
73
|
+
name: 'pdfEncryptSetOwnerPassword',
|
|
74
|
+
type: 'string',
|
|
75
|
+
typeOptions: {
|
|
76
|
+
password: true,
|
|
77
|
+
},
|
|
78
|
+
default: '',
|
|
79
|
+
displayOptions: {
|
|
80
|
+
show: {
|
|
81
|
+
operation: ['pdf/encrypt'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
description: 'Owner password used for permissions; with this password, all protections can be removed',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Allow Extract',
|
|
88
|
+
name: 'pdfEncryptAllowExtract',
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
default: false,
|
|
91
|
+
displayOptions: {
|
|
92
|
+
show: {
|
|
93
|
+
operation: ['pdf/encrypt'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
description: 'Whether to allow extracting content from the PDF',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Allow Accessibility',
|
|
100
|
+
name: 'pdfEncryptAllowAccessibility',
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
default: true,
|
|
103
|
+
displayOptions: {
|
|
104
|
+
show: {
|
|
105
|
+
operation: ['pdf/encrypt'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
description: 'Whether to allow accessibility features such as screen readers',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Allow Modify',
|
|
112
|
+
name: 'pdfEncryptAllowModify',
|
|
113
|
+
type: 'string',
|
|
114
|
+
default: '',
|
|
115
|
+
placeholder: 'form',
|
|
116
|
+
displayOptions: {
|
|
117
|
+
show: {
|
|
118
|
+
operation: ['pdf/encrypt'],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
description: 'Level of modification allowed for the PDF (for example "form"); see CloudConvert docs for valid values',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
displayName: 'Allow Print',
|
|
125
|
+
name: 'pdfEncryptAllowPrint',
|
|
126
|
+
type: 'string',
|
|
127
|
+
default: '',
|
|
128
|
+
placeholder: 'full',
|
|
129
|
+
displayOptions: {
|
|
130
|
+
show: {
|
|
131
|
+
operation: ['pdf/encrypt'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
description: 'Level of printing allowed for the PDF (for example "full"); see CloudConvert docs for valid values',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Password',
|
|
138
|
+
name: 'pdfDecryptPassword',
|
|
139
|
+
type: 'string',
|
|
140
|
+
typeOptions: {
|
|
141
|
+
password: true,
|
|
142
|
+
},
|
|
143
|
+
default: '',
|
|
144
|
+
displayOptions: {
|
|
145
|
+
show: {
|
|
146
|
+
operation: ['pdf/decrypt'],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
description: 'Password of the encrypted PDF file',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Pages',
|
|
153
|
+
name: 'pdfExtractPagesPages',
|
|
154
|
+
type: 'string',
|
|
155
|
+
default: '',
|
|
156
|
+
placeholder: '1,2,5-7',
|
|
157
|
+
displayOptions: {
|
|
158
|
+
show: {
|
|
159
|
+
operation: ['pdf/extract-pages'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
description: 'Single pages or page ranges to extract, for example "1,2,5-7"; page numbering starts at 1',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
displayName: 'Pages',
|
|
166
|
+
name: 'pdfRotatePagesPages',
|
|
167
|
+
type: 'string',
|
|
168
|
+
default: '',
|
|
169
|
+
placeholder: '1,2,5-7',
|
|
170
|
+
displayOptions: {
|
|
171
|
+
show: {
|
|
172
|
+
operation: ['pdf/rotate-pages'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
description: 'Single pages or page ranges to rotate, for example "1,2,5-7"; page numbering starts at 1',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
displayName: 'Rotation',
|
|
179
|
+
name: 'pdfRotatePagesRotation',
|
|
180
|
+
type: 'string',
|
|
181
|
+
default: '',
|
|
182
|
+
placeholder: '+90',
|
|
183
|
+
displayOptions: {
|
|
184
|
+
show: {
|
|
185
|
+
operation: ['pdf/rotate-pages'],
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
description: 'Rotation angle to apply, for example "+90", "-90", or "180"',
|
|
189
|
+
},
|
|
190
|
+
];
|
|
191
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../nodes/CloudConvert/operations/pdf/fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAsB;IAC3C;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI;aACX;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI;aACX;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,IAAI;aACX;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,OAAO,CAAC;aACpB;SACD;QACD,WAAW,EAAE,uCAAuC;KACpD;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,SAAS,C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,0FAA0F;KAC3F;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAC/B;SACD;QACD,WAAW,EAAE,6DAA6D;KAC1E;CACD,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudconvert/n8n-nodes-cloudconvert",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "n8n node for CloudConvert - an online file conversion and processing API which allows to convert files, create thumbnails, merge files, add watermarks and more!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package"
|