Knowledge Base

Printing from your browser without a print dialog?

Printing in an online world, does that still exist? Less and less, of course, but there are still applications where it is simply necessary. Think of labels, delivery notes for external drivers, work orders for production sites, etc. There are still so many places where printing takes place.

However, printing from a web application or an app to any given printer? That is not so easy. Normally you can only do that through a browser print screen. And only on the printers installed on your system. And only by downloading the document to be printed.

Work and print online

For one of our customers, we have developed a solution to print without the intervention of the print screen. To be able to print on any printer in the company. To be able to print without the user having to download a document. To print a label directly in ZPL or EPL coding. Log on and print from any printer in the company from anywhere in the world.

Printing via a service.

To realise this GDK Software has developed a printer gateway that consists of two parts. The first part is a service that can be installed on the server where the printers are connected. Here the printers that may be used by the printer gateway can be selected.

The second part is a module in the Mendix application that is connected to it. Per application, it is possible to configure which employees can use the printer gateway. Also, a preferred printer can be specified for employees or documents.

When the user wants to print a document, he simply presses the print button and the module prepares the file for the service. The service asks the application at a fixed interval if there is anything else to print and then downloads the prepared document. The document is then sent to the installed printer. A deliberate choice was made here to use polling instead of pushing, because most services are allowed to make a request to the outside from the inside. Allowing a service in from the outside, however, always requires more configuration and is therefore not so simple in the setup.

Each service has a unique code. It is therefore possible to send documents to multiple services within one application. Within Mendix we have a ready-made module that can communicate with the service. Of course, the service can also be used in combination with any web application, as long as it has a REST API with the necessary endpoints.


Interested in this solution? Send us an email and we’ll tell you more!

Written by Reinier Stam
Mendix developer


Let us help you to realise your ambitions