# Printer Configuration in Node-Red

**URL:** <https://discourse.nodered.org/t/printer-configuration-in-node-red/98837>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [26 August 2025 04:54 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837 "2025-08-26T04:54:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![salokhevaibhav](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salokhevaibhav/32/102947_2.png) [@salokhevaibhav](https://discourse.nodered.org/u/salokhevaibhav)\
**Post date:** [26 August 2025 04:54 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837/1 "2025-08-26T04:54:34Z")

</div>

**Hello everyone,**

I'm currently working on designing a label for a dashboard, and I need this label to be printed via a printer when a command is triggered. The printer will either be installed locally on a Windows machine or accessible over the network.

As I'm new to Node-RED, I would really appreciate some guidance on how to get started and what the overall flow should look like. Any help or suggestions would be greatly appreciated.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Urs-Eppenberger](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/urs-eppenberger/32/28_2.png) [@Urs-Eppenberger](https://discourse.nodered.org/u/Urs-Eppenberger)\
**Post date:** [26 August 2025 05:38 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837/2 "2025-08-26T05:38:37Z")

</div>

Hello, and welcome to Node-RED and to the forum.

I’m reading this forum since many years and never have read anything close to what you plan to achieve. There is most probably no ready made solution. Building blocks might be:

- create a PDF file with the content
- send it to a client which handles the Internet Printing Protocol connected to the printer

Kind regards, Urs.

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [26 August 2025 08:05 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837/3 "2025-08-26T08:05:15Z")

</div>

You can use the `window.print()` function from within a template node. Just create a popup window, populate it with whatever you wish to print, and then send it to the printer. For example:

```auto
<template>
    <div>
        <v-btn @click="goPrint('<h1>Hello World!</h1>')">Print Hello</v-btn>
    </div>
</template>
<script>
    export default {
        methods: {
            goPrint: function (text) {
              const htmlPrefix = '<html><head><title>Print</title></head><body>';
              const htmlSuffix = '</body></html>';
              const printWindow = window.open('', '', 'width=800,height=600');
              printWindow.document.write(htmlPrefix);
              printWindow.document.write(text);
              printWindow.document.write(htmlSuffix);
              printWindow.document.close();

              printWindow.focus();
              printWindow.print();
              printWindow.close();
            }
        }
    }
</script>

```

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [27 August 2025 03:04 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837/4 "2025-08-27T03:04:30Z")

</div>

Been here.. Done this

I would recommend Zebra printers using ZPL or Epson

Its all Text based, You can do an online design [Labelary Online ZPL Viewer](https://labelary.com/viewer.html)

grab the ascii text, put your variables into a function node and send to the printer with TCP port 9100

Done

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 November 2025 03:04 UTC](https://discourse.nodered.org/t/printer-configuration-in-node-red/98837/5 "2025-11-25T03:04:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
