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 thenode-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.