Label printing preview in app

We would like to display a preview of the label (ZPL with variable) before printing. We were thinking of using the service which allows us to call an API to send the ZPL code and retrieve a PNG image or a PDF format.

ex :^xa^cfa,50^fo100,100^fdHello World^fs^xz

Do you have a trick (like the QR Code) to display the label in the application?


Hey Youri,

Yeah you can use an SQL connector to create/return an image URL.
I had to replace some characters to enable it to work as an image URL.

This is the query I used:
Tulip app input was the ZPL code zpl_code.
Connectors return an image variable.

select concat(‘’, replace(replace(replace(replace(replace(replace(replace(zpl_code, ’ ‘, ‘%20’), ‘^’, ‘%5E’), ’ ‘, ‘%20’),’#’,’%23’),’[’,’%5B’),’>’,’%3E’), CHR(10), ‘%20’)) as "label"