@custom-js/n8n-nodes-pdf-toolkit 1.40.0 → 1.41.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.
@@ -85,10 +85,10 @@ class CompressPDF {
85
85
  return PDF_COMPRESS(input);`,
86
86
  returnBinary: "true",
87
87
  },
88
- encoding: null,
88
+ encoding: 'arraybuffer',
89
89
  json: true,
90
90
  };
91
- const response = await this.helpers.request(options);
91
+ const response = await this.helpers.httpRequest(options);
92
92
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
93
93
  // No binary data returned; emit only JSON without a binary property
94
94
  returnData.push({
@@ -95,10 +95,10 @@ class ExtractPages {
95
95
  return EXTRACT_PAGES_FROM_PDF(pdfBuffer, input.pageRange);`,
96
96
  returnBinary: "true",
97
97
  },
98
- encoding: null,
98
+ encoding: 'arraybuffer',
99
99
  json: true,
100
100
  };
101
- const response = await this.helpers.request(options);
101
+ const response = await this.helpers.httpRequest(options);
102
102
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
103
103
  // No binary data returned; emit only JSON without a binary property
104
104
  returnData.push({
@@ -54,10 +54,10 @@ class Html2Docx {
54
54
  code: "const { HTML2DOCX } = require('./utils'); return HTML2DOCX(input)",
55
55
  returnBinary: "true",
56
56
  },
57
- encoding: null,
57
+ encoding: 'arraybuffer',
58
58
  json: true,
59
59
  };
60
- const response = await this.helpers.request(options);
60
+ const response = await this.helpers.httpRequest(options);
61
61
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
62
62
  // No binary data returned; emit only JSON without a binary property
63
63
  returnData.push({
@@ -54,10 +54,10 @@ class Html2Pdf {
54
54
  code: "const { HTML2PDF } = require('./utils'); return HTML2PDF(input)",
55
55
  returnBinary: "true",
56
56
  },
57
- encoding: null,
57
+ encoding: 'arraybuffer',
58
58
  json: true,
59
59
  };
60
- const response = await this.helpers.request(options);
60
+ const response = await this.helpers.httpRequest(options);
61
61
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
62
62
  // No binary data returned; emit only JSON without a binary property
63
63
  returnData.push({
@@ -260,10 +260,10 @@ class InvoiceGenerator {
260
260
  code: code,
261
261
  returnBinary: 'true',
262
262
  },
263
- encoding: null,
263
+ encoding: 'arraybuffer',
264
264
  json: true,
265
265
  };
266
- const response = await this.helpers.request(options);
266
+ const response = await this.helpers.httpRequest(options);
267
267
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
268
268
  returnData.push({
269
269
  json: items[i].json,
@@ -77,10 +77,10 @@ class MergePdfs {
77
77
  return PDF_MERGE(input);`,
78
78
  returnBinary: "true",
79
79
  },
80
- encoding: null,
80
+ encoding: 'arraybuffer',
81
81
  json: true,
82
82
  };
83
- const response = await this.helpers.request(options);
83
+ const response = await this.helpers.httpRequest(options);
84
84
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
85
85
  // No binary data returned; emit only JSON without a binary property
86
86
  returnData.push({
@@ -117,10 +117,10 @@ class PdfFormFill {
117
117
  return PDF_FILL_FORM(pdfInput, fieldValues);`,
118
118
  returnBinary: "true",
119
119
  },
120
- encoding: null,
120
+ encoding: 'arraybuffer',
121
121
  json: true,
122
122
  };
123
- const response = await this.helpers.request(options);
123
+ const response = await this.helpers.httpRequest(options);
124
124
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
125
125
  // No binary data returned; emit only JSON without a binary property
126
126
  returnData.push({
@@ -85,10 +85,10 @@ class PdfToPng {
85
85
  return PDF2PNG(input);`,
86
86
  returnBinary: "true",
87
87
  },
88
- encoding: null,
88
+ encoding: 'arraybuffer',
89
89
  json: true,
90
90
  };
91
- const response = await this.helpers.request(options);
91
+ const response = await this.helpers.httpRequest(options);
92
92
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
93
93
  // No binary data returned; emit only JSON without a binary property
94
94
  returnData.push({
@@ -145,10 +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
+ encoding: (returnValueType === "binary" ? 'arraybuffer' : undefined),
149
149
  json: true,
150
150
  };
151
- const response = await this.helpers.request(options);
151
+ const response = await this.helpers.httpRequest(options);
152
152
  if (returnValueType === "binary") {
153
153
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
154
154
  // No binary data returned; emit only JSON without a binary property
@@ -51,10 +51,10 @@ class WebsiteScreenshot {
51
51
  code: "const { SCREENSHOT } = require('./utils'); return SCREENSHOT(input);",
52
52
  returnBinary: "true",
53
53
  },
54
- encoding: null,
54
+ encoding: 'arraybuffer',
55
55
  json: true,
56
56
  };
57
- const response = await this.helpers.request(options);
57
+ const response = await this.helpers.httpRequest(options);
58
58
  if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
59
59
  // No binary data returned; emit only JSON without a binary property
60
60
  returnData.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@custom-js/n8n-nodes-pdf-toolkit",
3
- "version": "1.40.0",
3
+ "version": "1.41.0",
4
4
  "description": "This is official node for interacting with APIs from customjs.space",
5
5
  "keywords": [
6
6
  "customjs",