Set up printing with codeunits
On this page
When printing with codeunits, it’s necessary to specify a layout through methods. NaviPartner has two public interfaces - one for Matrix (codeunit 6060039 “NPR RP Matrix Print”), and the other for Line printing (codeunit 6150960 “NPR RP Line Print”).
There are multiple default ready-to-use codeunits available in the system, but it’s also possible to create new ones and import them to your NP environment. Each codeunit needs to consist of a unique ID which is used to reference it when selecting which content is printed.
Besides the required unique ID, each codeunit consists of the following elements:
- column distribution parameters and element placement coordinates
- data items and layout specifics
- preset commands e.g. papercut, open drawer etc.
- the process buffer elements which determine the printing procedure specifics
To select a codeunit for printing purposes, follow the provided steps:
Click the button, enter Print Template Output Setup, and open the related link.
A list of configured print templates is displayed.Add New.
Open the dropdown list in the Codeunit ID column, followed by Select from full list.
A list of all existing codeunits is displayed. They are usually accompanied by descriptions which help you determine their purpose.Choose the codeunit you wish to print, and bear in mind that they either fit the line or the matrix print scenario.
If you're selecting print output via codeunits, it's not necessary to populate the Print Template field.Specify the Output Type by selecting one of the following options:
- Printer Name – Specifies the name of the printer which is connected via USB, IP Address or cable to the POS Unit. It is a direct connection and can be established via a network as well.
- MPOS HTTP - Printing is implemented via the Internet Print Protocol (IPP), which is encapsulated in the Hypertext Transfer Protocol (HTTP). With Internet printing, you can manage any shared printer on the print server from your MPOS.
- MPOS Bluetooth - Bluetooth printers operate via wireless technology that can be configured to operate across iOS, Android & Windows devices.
- PrintNode - PrintNode is a hosted printing service that can help you quickly, easily and securely add remote printing to your application.
Make sure you’ve selected the correct printer in the Output Path field.
The print job will be sent to it once initiated.