# How to convert text files to PDF file

**URL:** <https://discourse.nodered.org/t/how-to-convert-text-files-to-pdf-file/63654>\
**Category:** General\
**Created:** [9 June 2022 05:26 UTC](https://discourse.nodered.org/t/how-to-convert-text-files-to-pdf-file/63654 "2022-06-09T05:26:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2022 07:05 UTC](https://discourse.nodered.org/t/how-to-convert-text-files-to-pdf-file/63654/2 "2022-06-09T07:05:56Z")

</div>

There are examples built in to [node-red-contrib-pdfmake](https://flows.nodered.org/node/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.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-convert-text-files-to-pdf-file/63654)._
