Duke ERP - OPOS Script
The software enables the OPOS Printers and works with customised scripts. It allows the end-user to use any OPOS-compatible printers to print the Receipts.

To configure the OPOS printers, you need to configure both client and server sides.

Client side

First of all, you need to configure the OPOS printer to the computer. To do this configuration, please refer to the specific drivers provided by the constructor of your printer. Once the setup done, open the software and push "F10". The following window will appear :


  1. Choose the printer name inside the combo box. The printer name is the same as setup with the OPOS driver.
  2. Once the printer is chosen, choose a number of columns and click on "Print a test receipt". If you doubt of the number to choose, take "60".
    A receipt is printed with a sequence of numbers (12345678901234...), count the number of characters in one single line. This amount is important ! In the example, our printer uses 42 characters.
  3. If you want to use a logo, you need to use the BMP-Monochrome(1 bit) format.
    1. Click on "Upload" and choose the logo file. If the transfer is OK, "None" will be changed by the "OK" text and the "Remove" button will be enabled.
    2. Choose the logo position (left, center or right)
    3. Choose the logo width. If you setup a too big number, an error will occur when you will test the printing.
    4. Click on "Print a test receipt" to test the size of the logo and, if needed, correct the previous parameters.
  4. To setup the header and the line mask, you will fill in the corresponding header and mask fields. As you fill in the fields, a counter appears on the right side. You need to have the right amount of characters (or a multiple of this amount if you want a multiple line printing).
      Details mask :
    • C : Product code
    • D : Product description
    • Q : Quantity of the product
    • U : Unit price (without VAT)
    • R : rebate
    • T : Line total (VAT included)
      Total mask :
    • X : Total without VAT
    • Y : Total of the VAT
    • Z : Total VAT included
      Payment mask :
    • T : Payment type
    • A : Payment amount
    • D : Payment date


Server side

You can setup the POS Printing Script by using the module "admin_posscript". Contact your administrator for more details.

Once the script shown, edit the corresponding script with the following values. You need to encode the scripts in the specific order "first script => first printed".
  • window.external.PrintLogo();
    Allows to print the logo with the specific client-side parameters.
  • window.external.PrintDetailsHeader();
    Prints the specific details header, as setup in the client-side parameter.
  • window.external.PrintTotalHeader();
    Prints the specific total header, as setup in the client-side parameter.
  • window.external.PrintPaymentHeader();
    Prints the specific payment header, as setup in the client-side parameter.
  • window.external.PrintLine("Text to insert");
    Prints a custom line. Or you use the specific number of caracters to finish a line, or you use the "\r\n" code to finish the current line, in case if you use different POS Printers.
  • #product_details#
    Prints the product details of the order following the specific structure of the mask.
  • #payment_details#
    Prints the payment details of the order following the specific structure of the mask.
  • #order_total#
    Prints the total details of the order following the specific structure of the mask.
For more information, contact your administrator.