Since a while, we had customers requesting for multi-language support on Nexo Print Server. For those who don’t know yet, Nexo Print Server is a Windows application which helps you to have NexoPOS receipts printed in a very faster and beautiful way. However, the main issue faced with NPS (Nexo Print Server) so far was that it can’t print some languages specific characters. This included: Arabic, Japanese, Chinese, etc. We’ve been working on improvement from the version 2.3.0 of NPS which introduced the support for Arabic, but the receipts were ‘not perfect. The ultimate change we did (the update 2.5.0), introduced a new solution to have a receipt using multiple languages and printed from NPS. That’s what we’re about to cover today.

Converting receipts to image for NPS

This is what we did on this version to have Nexo Print Server printing in multiple languages. The solution is quite simple. When an order is placed, NexoPOS request the receipt (using the regular receipt option available) and convert it to an image (base64), then that image is sent to Nexo Print Server along with the currently selected printer. NPS convert the image into a buffer and render it to the thermal printer. The solution is quite slow comparing that to the normal solution, but that, however, makes NPS support various characters.

Let’s now see how to configure the support for Base64 images on NexoPOS.

NexoPOS 3.14.49 is required to use this feature

Before getting into the configurations, we need to remind you that this update only works with the last version of NexoPOS which is 3.14.49. So from that version, you can use that Nexo Print Server feature. Let’s then proceed and assume you have the setup ready. You need to head to the Checkout Settings then on the Printers tab, you need to make sure Nexo Print Server is set as printing gateway.

Now, you need to head to the “Invoices & Receipts” under “NexoPOS Settings” to make sure NexoPOS convert the receipt into an image before sending that to NPS.

Now save the settings.

Choosing the receipt template

Since that feature uses the browser receipt, it means that you can now choose the browser template and have that printed on NPS. Let’s head to the “Checkout” settings then “printers” tab to make a choice of a template.

Customizing the receipt

According to your language, you might need to customize the receipt to make it bigger or smaller. I’ll show you how to do that. You should remind that NexoPOS has 3 different templates for the browser printing (now available on NPS) :

  • Lightweight
  • Simple
  • Default

each of these is located on the following directory of NexoPOS application/modules/nexo/views/receipts, respectively with the following file names :

  • light.php
  • simple.php
  • default.php

Each of these files has at the end a CSS section where you can customize the size. NexoPOS wrap the receipt under a div which has the id #print-base64. It means that on that file you can apply specific CSS styles and change the font size. Usually, for printing, we use the view-port measure. This lets you set a percentage width according to the device width. We’ll then use that to make sure NexoPOS prints well.

Here we select all elements under the #print-base64 container. Doing that increase the font-size of all elements. You can, however, target some specific elements using CSS selectors.

Note about images not appearing on the receipts

You should note that this solution has a limitation. if you want to use your images on the receipt, you should make sure that the image is stored in your NexoPOS installation (you should upload it to the public folder). If the images are stored on an external domain, that image won’t appear on the receipts. This is actually a security limitation linked to Canvas and tainted images.

Celebrating the update of Nexo Print Server

We would like to celebrate this update by offering a 40% discount on Nexo Print Server until the 20 July 2019. This should help you to use the solutions on your computer if you were blocked by the language support limitation.

Plus having a copy of Nexo Print Server will give you the access of the upcoming version under development. Let us know by commenting if you enjoyed that update.