Hello,
I want to ask something about generating the PDF using node-red.
The PDF I want to generate is the water meter bill as shown in the photo.
How can I generate something like that?
I already keep the meter reading data in the mySQL database.
Many Thanks,
Simon
There are some pdf nodes available on the flows page of this site.
https://flows.nodered.org/search?term=pdf
Hi ghayne,
Could you mind if you give me some examples?
I am really bad at node-red.
I'm sorry, it's not something I have ever done.
Node-red-contrib-pdfmake has built in examples (ctrl-i
> examples) and there are many solutions on the forum.
I recommend watching this playlist: Node-RED Essentials . The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
Thanks Steve
I'll work on it now and please let me get back to you if I've some questions !
Cheers
Here are a couple of links to some of the threads @Steve-Mcl mentioned.
please help to guidline code How to push multiple arry pdfmake 1 page
var stuff = msg.payload[];
var dd = {
content: stuff.map(function(item) {
return { text: item, pageBreak: 'after'}
})
};
msg.payload = dd;
return msg;
I'm trying to use this node to create a PDF from a 'document description' as a project for my IoT students to automatically create a newsletter using text and images from external sources. So far text insertion works fine, the problem is inserting an image as per the supplied example with the node.
With help from @zenofmud I have this flow which uses http-request to insert an external image (from a remote server or a server like NGINX on a local RPi) successfully in to a document.
[pdfmake_f…
Here's a link to the "playground" with many examples of creating documents with different layouts.
http://pdfmake.org/playground.html
system
Closed
28 August 2023 05:56
8
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.