@custom-js/n8n-nodes-pdf-toolkit 1.38.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/CompressPDF/CompressPDF.node.js +2 -4
- package/dist/nodes/ExtractPages/ExtractPages.node.js +2 -4
- package/dist/nodes/GetFormFieldNames/GetFormFieldNames.node.js +1 -1
- package/dist/nodes/Html2Docx/Html2Docx.node.js +2 -4
- package/dist/nodes/Html2Pdf/Html2Pdf.node.js +2 -4
- package/dist/nodes/InvoiceGenerator/InvoiceGenerator.node.js +3 -5
- package/dist/nodes/Markdown2Html/Markdown2Html.node.js +1 -1
- package/dist/nodes/MergePdfs/MergePdfs.node.js +2 -4
- package/dist/nodes/PdfFormFill/PdfFormFill.node.js +2 -4
- package/dist/nodes/PdfToPng/PdfToPng.node.js +2 -4
- package/dist/nodes/PdfToText/PdfToText.node.js +1 -1
- package/dist/nodes/SSLChecker/SSLChecker.node.js +1 -1
- package/dist/nodes/Scraper/Scraper.node.js +2 -4
- package/dist/nodes/WebsiteScreenshot/WebsiteScreenshot.node.js +2 -4
- package/package.json +1 -1
|
@@ -85,12 +85,10 @@ class CompressPDF {
|
|
|
85
85
|
return PDF_COMPRESS(input);`,
|
|
86
86
|
returnBinary: "true",
|
|
87
87
|
},
|
|
88
|
+
encoding: null,
|
|
88
89
|
json: true,
|
|
89
|
-
returnFullResponse: true,
|
|
90
|
-
responseType: 'arraybuffer',
|
|
91
90
|
};
|
|
92
|
-
const
|
|
93
|
-
const response = responseData.body;
|
|
91
|
+
const response = await this.helpers.request(options);
|
|
94
92
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
95
93
|
// No binary data returned; emit only JSON without a binary property
|
|
96
94
|
returnData.push({
|
|
@@ -95,12 +95,10 @@ class ExtractPages {
|
|
|
95
95
|
return EXTRACT_PAGES_FROM_PDF(pdfBuffer, input.pageRange);`,
|
|
96
96
|
returnBinary: "true",
|
|
97
97
|
},
|
|
98
|
+
encoding: null,
|
|
98
99
|
json: true,
|
|
99
|
-
returnFullResponse: true,
|
|
100
|
-
responseType: 'arraybuffer',
|
|
101
100
|
};
|
|
102
|
-
const
|
|
103
|
-
const response = responseData.body;
|
|
101
|
+
const response = await this.helpers.request(options);
|
|
104
102
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
105
103
|
// No binary data returned; emit only JSON without a binary property
|
|
106
104
|
returnData.push({
|
|
@@ -54,12 +54,10 @@ class Html2Docx {
|
|
|
54
54
|
code: "const { HTML2DOCX } = require('./utils'); return HTML2DOCX(input)",
|
|
55
55
|
returnBinary: "true",
|
|
56
56
|
},
|
|
57
|
+
encoding: null,
|
|
57
58
|
json: true,
|
|
58
|
-
returnFullResponse: true,
|
|
59
|
-
responseType: 'arraybuffer',
|
|
60
59
|
};
|
|
61
|
-
const
|
|
62
|
-
const response = responseData.body;
|
|
60
|
+
const response = await this.helpers.request(options);
|
|
63
61
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
64
62
|
// No binary data returned; emit only JSON without a binary property
|
|
65
63
|
returnData.push({
|
|
@@ -54,12 +54,10 @@ class Html2Pdf {
|
|
|
54
54
|
code: "const { HTML2PDF } = require('./utils'); return HTML2PDF(input)",
|
|
55
55
|
returnBinary: "true",
|
|
56
56
|
},
|
|
57
|
+
encoding: null,
|
|
57
58
|
json: true,
|
|
58
|
-
returnFullResponse: true,
|
|
59
|
-
responseType: 'arraybuffer',
|
|
60
59
|
};
|
|
61
|
-
const
|
|
62
|
-
const response = responseData.body;
|
|
60
|
+
const response = await this.helpers.request(options);
|
|
63
61
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
64
62
|
// No binary data returned; emit only JSON without a binary property
|
|
65
63
|
returnData.push({
|
|
@@ -260,17 +260,15 @@ class InvoiceGenerator {
|
|
|
260
260
|
code: code,
|
|
261
261
|
returnBinary: 'true',
|
|
262
262
|
},
|
|
263
|
+
encoding: null,
|
|
263
264
|
json: true,
|
|
264
|
-
returnFullResponse: true,
|
|
265
|
-
responseType: 'arraybuffer',
|
|
266
265
|
};
|
|
267
|
-
const
|
|
268
|
-
const response = responseData.body;
|
|
266
|
+
const response = await this.helpers.request(options);
|
|
269
267
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
270
|
-
// No binary data returned; emit only JSON without a binary property
|
|
271
268
|
returnData.push({
|
|
272
269
|
json: items[i].json,
|
|
273
270
|
});
|
|
271
|
+
continue;
|
|
274
272
|
}
|
|
275
273
|
const binaryData = await this.helpers.prepareBinaryData(response, "Invoice.pdf");
|
|
276
274
|
returnData.push({
|
|
@@ -77,12 +77,10 @@ class MergePdfs {
|
|
|
77
77
|
return PDF_MERGE(input);`,
|
|
78
78
|
returnBinary: "true",
|
|
79
79
|
},
|
|
80
|
+
encoding: null,
|
|
80
81
|
json: true,
|
|
81
|
-
returnFullResponse: true,
|
|
82
|
-
responseType: 'arraybuffer',
|
|
83
82
|
};
|
|
84
|
-
const
|
|
85
|
-
const response = responseData.body;
|
|
83
|
+
const response = await this.helpers.request(options);
|
|
86
84
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
87
85
|
// No binary data returned; emit only JSON without a binary property
|
|
88
86
|
returnData.push({
|
|
@@ -117,12 +117,10 @@ class PdfFormFill {
|
|
|
117
117
|
return PDF_FILL_FORM(pdfInput, fieldValues);`,
|
|
118
118
|
returnBinary: "true",
|
|
119
119
|
},
|
|
120
|
+
encoding: null,
|
|
120
121
|
json: true,
|
|
121
|
-
returnFullResponse: true,
|
|
122
|
-
responseType: 'arraybuffer',
|
|
123
122
|
};
|
|
124
|
-
const
|
|
125
|
-
const response = responseData.body;
|
|
123
|
+
const response = await this.helpers.request(options);
|
|
126
124
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
127
125
|
// No binary data returned; emit only JSON without a binary property
|
|
128
126
|
returnData.push({
|
|
@@ -85,12 +85,10 @@ class PdfToPng {
|
|
|
85
85
|
return PDF2PNG(input);`,
|
|
86
86
|
returnBinary: "true",
|
|
87
87
|
},
|
|
88
|
+
encoding: null,
|
|
88
89
|
json: true,
|
|
89
|
-
returnFullResponse: true,
|
|
90
|
-
responseType: 'arraybuffer',
|
|
91
90
|
};
|
|
92
|
-
const
|
|
93
|
-
const response = responseData.body;
|
|
91
|
+
const response = await this.helpers.request(options);
|
|
94
92
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
95
93
|
// No binary data returned; emit only JSON without a binary property
|
|
96
94
|
returnData.push({
|
|
@@ -145,12 +145,10 @@ class Scraper {
|
|
|
145
145
|
`return SCRAPER(payload.url, payload.commands || [], "${returnValueType === "binary" ? "image" : "html"}", ${debug ? "true" : "false"});`,
|
|
146
146
|
returnBinary: returnValueType === "binary" ? "true" : "false",
|
|
147
147
|
},
|
|
148
|
+
encoding: null,
|
|
148
149
|
json: true,
|
|
149
|
-
returnFullResponse: returnValueType === "binary",
|
|
150
|
-
responseType: returnValueType === "binary" ? 'arraybuffer' : undefined,
|
|
151
150
|
};
|
|
152
|
-
const
|
|
153
|
-
const response = returnValueType === "binary" ? responseData.body : responseData;
|
|
151
|
+
const response = await this.helpers.request(options);
|
|
154
152
|
if (returnValueType === "binary") {
|
|
155
153
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
156
154
|
// No binary data returned; emit only JSON without a binary property
|
|
@@ -51,12 +51,10 @@ class WebsiteScreenshot {
|
|
|
51
51
|
code: "const { SCREENSHOT } = require('./utils'); return SCREENSHOT(input);",
|
|
52
52
|
returnBinary: "true",
|
|
53
53
|
},
|
|
54
|
+
encoding: null,
|
|
54
55
|
json: true,
|
|
55
|
-
returnFullResponse: true,
|
|
56
|
-
responseType: 'arraybuffer',
|
|
57
56
|
};
|
|
58
|
-
const
|
|
59
|
-
const response = responseData.body;
|
|
57
|
+
const response = await this.helpers.request(options);
|
|
60
58
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
61
59
|
// No binary data returned; emit only JSON without a binary property
|
|
62
60
|
returnData.push({
|