Yes is the same behaviour
I will put here my test, if you want to test yourself. I am not sure what I miss or do wrong.
[
{
"id": "0532e4eaf6063d8f",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3108bb639f2e775a",
"type": "inject",
"z": "0532e4eaf6063d8f",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 600,
"y": 240,
"wires": [
[
"dd568d4d509e44a5"
]
]
},
{
"id": "dd568d4d509e44a5",
"type": "function",
"z": "0532e4eaf6063d8f",
"name": "set pdf",
"func": "var pdf_content = \"\";\n\npdf_content = {\n\n pageSize: 'A4', \n pageMargins: [15, 30, 15, 30],\n \n content: [\n {\n text: \"some text here\",\n font: \"Helvetica\"\n }\n ],\n styles: {\n header: {\n fontSize: 18,\n bold: true,\n margin: [0, 0, 0, 10]\n },\n subheader: {\n fontSize: 16,\n bold: true,\n margin: [0, 10, 0, 5]\n },\n tableExample: {\n margin: [0, 5, 0, 15]\n },\n tableHeader: {\n bold: true,\n fontSize: 13,\n color: 'black'\n }\n },\n defaultStyle: {\n // font: 'Helvetica'\n }\n}\n\n\nmsg.payload = pdf_content;\nmsg.filename = \"/home/bisol/test/\" + Date.now() + \".pdf\";\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 790,
"y": 240,
"wires": [
[
"5d0cd13528ad66f1"
]
]
},
{
"id": "5d0cd13528ad66f1",
"type": "pdfmake",
"z": "0532e4eaf6063d8f",
"name": "",
"outputType": "Buffer",
"inputProperty": "payload",
"options": "{}",
"outputProperty": "payload",
"x": 1000,
"y": 240,
"wires": [
[
"8b6983796f58596e"
]
]
},
{
"id": "8b6983796f58596e",
"type": "file",
"z": "0532e4eaf6063d8f",
"name": "",
"filename": "filename",
"filenameType": "msg",
"appendNewline": true,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 1200,
"y": 240,
"wires": [
[]
]
}
]
Thanks