# How to generate the PDF from Node-Red

**URL:** <https://discourse.nodered.org/t/how-to-generate-the-pdf-from-node-red/79469>\
**Category:** General\
**Tags:** node-red-dashboard, database, function-node\
**Created:** [28 June 2023 16:42 UTC](https://discourse.nodered.org/t/how-to-generate-the-pdf-from-node-red/79469 "2023-06-28T16:42:48Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 June 2023 05:55 UTC](https://discourse.nodered.org/t/how-to-generate-the-pdf-from-node-red/79469/7 "2023-06-29T05:55:42Z")

</div>

Here are a couple of links to some of the threads @Steve-Mcl mentioned.

> [@How to push multiple array pdfmake](https://discourse.nodered.org/t/how-to-push-multiple-array-pdfmake/63839/1):
>
> 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;

> [@Has anyone used the 'pdfmake' node to embed an image in a document?](https://discourse.nodered.org/t/has-anyone-used-the-pdfmake-node-to-embed-an-image-in-a-document/74978/1):
>
> 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.

Here's a link to the "playground" with many examples of creating documents with different layouts.  
[http://pdfmake.org/playground.html](http://pdfmake.org/playground.html)

---

_[View the full topic](https://discourse.nodered.org/t/how-to-generate-the-pdf-from-node-red/79469)._
