@custom-js/n8n-nodes-pdf-toolkit 1.31.0 → 1.33.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.
|
@@ -176,8 +176,11 @@ class InvoiceGenerator {
|
|
|
176
176
|
const templateString = await fetch(tpl).then(r => r.text());
|
|
177
177
|
const renderedHtml = await nunjucks.renderString(
|
|
178
178
|
templateString,
|
|
179
|
-
{ invoiceData: JSON.stringify(input).replace(
|
|
179
|
+
{ invoiceData: JSON.stringify(input).replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\").replace(/\\n/g, '\\\\n')
|
|
180
|
+
|
|
181
|
+
}
|
|
180
182
|
);
|
|
183
|
+
console.log('renderedHtml', renderedHtml);
|
|
181
184
|
return HTML2PDF(renderedHtml);
|
|
182
185
|
`;
|
|
183
186
|
const options = {
|
|
@@ -192,7 +195,7 @@ class InvoiceGenerator {
|
|
|
192
195
|
code: code,
|
|
193
196
|
returnBinary: 'true',
|
|
194
197
|
},
|
|
195
|
-
encoding:
|
|
198
|
+
encoding: null,
|
|
196
199
|
json: true,
|
|
197
200
|
};
|
|
198
201
|
const response = await this.helpers.request(options);
|