How to convert text files to PDF file

Anyone have sample flow to text files to PDF file

There are examples built in to node-red-contrib-pdfmake

Examples

Examples are provided using the default node-red way, i.e. use import in the editor menu and look for examples in the node-red-contrib-pdfmake package

#1 simple text PDF

This is the first example found on the pdfmake website.

#2 image & svg example PDF

This is a custom example showing how to read an image from file and integrate it into the PDF. It also shows a simple SVG to be included as well.

Try them & then try using a file node to load your text file & pass the text to it.

Hi Steve let you guidline flow?

What have you tried?

Did you import any of the examples?

Do you have the text file loading into node-red?

Post your current work & someone will assist.

[{"id":"cf65376e4d875d23","type":"tab","label":"Flow 11","disabled":false,"info":"","env":[]},{"id":"292df816cf5b98e7","type":"debug","z":"cf65376e4d875d23","name":"file","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":520,"wires":[]},{"id":"cb7bfed7.2054a","type":"change","z":"cf65376e4d875d23","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"combined[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":420,"wires":[[]]},{"id":"87182c66.4a1d3","type":"debug","z":"cf65376e4d875d23","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":500,"wires":[]},{"id":"00345b79e1950558","type":"file function","z":"cf65376e4d875d23","name":"","filename":"D:\\log\\log.txt","reloadfile":true,"outputs":1,"x":430,"y":560,"wires":[["8aa58ee2326b776a","292df816cf5b98e7"]]},{"id":"376e69c962da4eb9","type":"file","z":"cf65376e4d875d23","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":840,"y":580,"wires":[["87182c66.4a1d3"]]},{"id":"8aa58ee2326b776a","type":"pdfmake","z":"cf65376e4d875d23","name":"","outputType":"base64","inputProperty":"payload","options":"{}","outputProperty":"payload","x":640,"y":580,"wires":[["376e69c962da4eb9"]]},{"id":"b620c47079446f2f","type":"inject","z":"cf65376e4d875d23","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":540,"wires":[["00345b79e1950558"]]}]