@custom-js/n8n-nodes-pdf-toolkit 1.37.0 → 1.38.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.
@@ -86,8 +86,11 @@ class CompressPDF {
86
86
  returnBinary: "true",
87
87
  },
88
88
  json: true,
89
+ returnFullResponse: true,
90
+ responseType: 'arraybuffer',
89
91
  };
90
- const response = await this.helpers.httpRequest(options);
92
+ const responseData = await this.helpers.httpRequest(options);
93
+ const response = responseData.body;
91
94
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
92
95
  // No binary data returned; emit only JSON without a binary property
93
96
  returnData.push({
@@ -96,8 +96,11 @@ class ExtractPages {
96
96
  returnBinary: "true",
97
97
  },
98
98
  json: true,
99
+ returnFullResponse: true,
100
+ responseType: 'arraybuffer',
99
101
  };
100
- const response = await this.helpers.httpRequest(options);
102
+ const responseData = await this.helpers.httpRequest(options);
103
+ const response = responseData.body;
101
104
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
102
105
  // No binary data returned; emit only JSON without a binary property
103
106
  returnData.push({
@@ -55,8 +55,11 @@ class Html2Docx {
55
55
  returnBinary: "true",
56
56
  },
57
57
  json: true,
58
+ returnFullResponse: true,
59
+ responseType: 'arraybuffer',
58
60
  };
59
- const response = await this.helpers.httpRequest(options);
61
+ const responseData = await this.helpers.httpRequest(options);
62
+ const response = responseData.body;
60
63
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
61
64
  // No binary data returned; emit only JSON without a binary property
62
65
  returnData.push({
@@ -55,8 +55,11 @@ class Html2Pdf {
55
55
  returnBinary: "true",
56
56
  },
57
57
  json: true,
58
+ returnFullResponse: true,
59
+ responseType: 'arraybuffer',
58
60
  };
59
- const response = await this.helpers.httpRequest(options);
61
+ const responseData = await this.helpers.httpRequest(options);
62
+ const response = responseData.body;
60
63
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
61
64
  // No binary data returned; emit only JSON without a binary property
62
65
  returnData.push({
@@ -261,14 +261,16 @@ class InvoiceGenerator {
261
261
  returnBinary: 'true',
262
262
  },
263
263
  json: true,
264
+ returnFullResponse: true,
265
+ responseType: 'arraybuffer',
264
266
  };
265
- const response = await this.helpers.httpRequest(options);
267
+ const responseData = await this.helpers.httpRequest(options);
268
+ const response = responseData.body;
266
269
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
267
270
  // No binary data returned; emit only JSON without a binary property
268
271
  returnData.push({
269
272
  json: items[i].json,
270
273
  });
271
- continue;
272
274
  }
273
275
  const binaryData = await this.helpers.prepareBinaryData(response, "Invoice.pdf");
274
276
  returnData.push({
@@ -78,8 +78,11 @@ class MergePdfs {
78
78
  returnBinary: "true",
79
79
  },
80
80
  json: true,
81
+ returnFullResponse: true,
82
+ responseType: 'arraybuffer',
81
83
  };
82
- const response = await this.helpers.httpRequest(options);
84
+ const responseData = await this.helpers.httpRequest(options);
85
+ const response = responseData.body;
83
86
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
84
87
  // No binary data returned; emit only JSON without a binary property
85
88
  returnData.push({
@@ -118,8 +118,11 @@ class PdfFormFill {
118
118
  returnBinary: "true",
119
119
  },
120
120
  json: true,
121
+ returnFullResponse: true,
122
+ responseType: 'arraybuffer',
121
123
  };
122
- const response = await this.helpers.httpRequest(options);
124
+ const responseData = await this.helpers.httpRequest(options);
125
+ const response = responseData.body;
123
126
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
124
127
  // No binary data returned; emit only JSON without a binary property
125
128
  returnData.push({
@@ -86,8 +86,11 @@ class PdfToPng {
86
86
  returnBinary: "true",
87
87
  },
88
88
  json: true,
89
+ returnFullResponse: true,
90
+ responseType: 'arraybuffer',
89
91
  };
90
- const response = await this.helpers.httpRequest(options);
92
+ const responseData = await this.helpers.httpRequest(options);
93
+ const response = responseData.body;
91
94
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
92
95
  // No binary data returned; emit only JSON without a binary property
93
96
  returnData.push({
@@ -146,8 +146,11 @@ class Scraper {
146
146
  returnBinary: returnValueType === "binary" ? "true" : "false",
147
147
  },
148
148
  json: true,
149
+ returnFullResponse: returnValueType === "binary",
150
+ responseType: returnValueType === "binary" ? 'arraybuffer' : undefined,
149
151
  };
150
- const response = await this.helpers.httpRequest(options);
152
+ const responseData = await this.helpers.httpRequest(options);
153
+ const response = returnValueType === "binary" ? responseData.body : responseData;
151
154
  if (returnValueType === "binary") {
152
155
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
153
156
  // No binary data returned; emit only JSON without a binary property
@@ -52,8 +52,11 @@ class WebsiteScreenshot {
52
52
  returnBinary: "true",
53
53
  },
54
54
  json: true,
55
+ returnFullResponse: true,
56
+ responseType: 'arraybuffer',
55
57
  };
56
- const response = await this.helpers.httpRequest(options);
58
+ const responseData = await this.helpers.httpRequest(options);
59
+ const response = responseData.body;
57
60
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
58
61
  // No binary data returned; emit only JSON without a binary property
59
62
  returnData.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@custom-js/n8n-nodes-pdf-toolkit",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "This is official node for interacting with APIs from customjs.space",
5
5
  "keywords": [
6
6
  "customjs",