Hi, i'm use html to pdf node, when i send html to node, return this error:
TypeError: Cannot read properties of undefined (reading 'split')
This is my code:
[
{
"id": "3f78bec97e2f1517",
"type": "html-to-pdf",
"z": "926d9efbb492c064",
"name": "",
"format": "A4",
"zoom": 100,
"orientation": "Portrait",
"width": "",
"height": "",
"widthUnit": "cm",
"heightUnit": "cm",
"marginTop": 1,
"marginLeft": 1,
"marginBottom": 1,
"marginRight": 1,
"marginTopUnits": "cm",
"marginLeftUnits": "cm",
"marginBottomUnits": "cm",
"marginRightUnits": "cm",
"omitBackground": false,
"printGraphics": true,
"x": 370,
"y": 260,
"wires": [
[
"323ae64d46b2979b"
]
]
},
{
"id": "b6d73b18.9b6a48",
"type": "template",
"z": "926d9efbb492c064",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<table>\n <thead>\n <tr>\n <th>Nombre</th>\n <th>Apellido</th>\n <th>Edad</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>John</td>\n <td>Doe</td>\n <td>30</td>\n </tr>\n <tr>\n <td>Jane</td>\n <td>Doe</td>\n <td>25</td>\n </tr>\n </tbody>\n</table>",
"output": "str",
"x": 160,
"y": 260,
"wires": [
[
"1af36e33.48c6c7",
"3f78bec97e2f1517",
"bc46de2db8066611"
]
]
},
{
"id": "1af36e33.48c6c7",
"type": "debug",
"z": "926d9efbb492c064",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 410,
"y": 180,
"wires": []
},
{
"id": "323ae64d46b2979b",
"type": "debug",
"z": "926d9efbb492c064",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 570,
"y": 260,
"wires": []
},
{
"id": "01fc7c38c7d214e2",
"type": "inject",
"z": "926d9efbb492c064",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 120,
"wires": [
[
"b6d73b18.9b6a48"
]
]
},
{
"id": "bc46de2db8066611",
"type": "function",
"z": "926d9efbb492c064",
"name": "function 1",
"func": "msg.html = msg.payload;\nmsg.filename = \"test.pdf\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 200,
"y": 420,
"wires": [
[
"156d280183658352"
]
]
},
{
"id": "156d280183658352",
"type": "html-to-pdf",
"z": "926d9efbb492c064",
"name": "",
"format": "A4",
"zoom": 100,
"orientation": "Portrait",
"width": "",
"height": "",
"widthUnit": "cm",
"heightUnit": "cm",
"marginTop": 1,
"marginLeft": 1,
"marginBottom": 1,
"marginRight": 1,
"marginTopUnits": "cm",
"marginLeftUnits": "cm",
"marginBottomUnits": "cm",
"marginRightUnits": "cm",
"omitBackground": false,
"printGraphics": true,
"x": 450,
"y": 500,
"wires": [
[
"a28316945f0fda9e"
]
]
},
{
"id": "a28316945f0fda9e",
"type": "debug",
"z": "926d9efbb492c064",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 670,
"y": 500,
"wires": []
}
]
I have everything running in a docker container with the following version: nodered/node-red:3.0.2
What can be wrong? I can't find much documentation with examples of how to use it correctly, or maybe I'm not looking for it right.