jpos / opos interface - tcpos wikiwiki.tcpos.com/wiki/images/7/71/posprinter_api_description.pdfjpos...

110
6.110.95.1.1.022 JPOS / OPOS Interface for RIK Printer Module From program version 2.62 onwards 6.110.95.1.1.022 en

Upload: lamtuyen

Post on 26-May-2018

307 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

6.110.95.1.1.022

JPOS / OPOS Interface for RIK Printer Module

From program version 2.62 onwards 6.110.95.1.1.022 en

Page 2: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

6.110.95.1.1.022

Alle Rechte vorbehalten All rights reserved Tous droits réservés Reservados todos los derechos Tutti i diritti riservati

© 02/2014 Bizerba GmbH & Co. KG 72336 Balingen Postfach 10 01 64 72301 Balingen/Germany Tel. (+49 7433) 12--0, Fax (+49 7433) 12--2696 e--mail: [email protected] Internet: http://www.bizerba.com

Page 3: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Table of contents

6.110.95.1.1.022 i

Table of contents Page

1 ABOUT THESE INSTRUCTIONS ...................................................... 1

1.1 Target group ......................................................................................................... 1

1.2 Additional applicable documents .......................................................................... 1 1.3 Symbols used ....................................................................................................... 1 1.4 Presentation and layout ........................................................................................ 1 1.4.1 Technical terms .................................................................................................... 1

2 ABOUT THE SOFTWARE ................................................................. 2

2.1 History .................................................................................................................. 2 2.2 POS-Printer Modules............................................................................................ 4

2.3 Rights ................................................................................................................... 4 2.3.1 Third-party software.............................................................................................. 4 2.4 Operating conditions ............................................................................................ 6

2.4.1 Hardware requirements ........................................................................................ 6 2.4.2 Software requirement ........................................................................................... 6

2.5 Warranty ............................................................................................................... 7 2.6 Virus protection .................................................................................................... 7

3 INSTALLATION ................................................................................. 8

3.1 Before installation ................................................................................................. 8

3.2 Installation ............................................................................................................ 8 3.2.1 Installation under w32 .......................................................................................... 8 3.2.2 Installation under Linux ........................................................................................ 9 3.3 Demo program / Test scripts ................................................................................ 9 3.4 Update .................................................................................................................. 9

3.5 Uninstall ................................................................................................................ 9

4 FUNCTIONAL AND DATA DESCRIPTION ..................................... 10

4.1 Overview ............................................................................................................. 10 4.2 Interface description ........................................................................................... 11

4.2.1 Overview which methods of the OPOS interface are implemented: ................... 15 4.2.2 Interface for JPOS .............................................................................................. 39 4.2.3 Interface for UPOSlib ......................................................................................... 41 4.3 Specifications ..................................................................................................... 61 4.3.1 DirectIO constants .............................................................................................. 61 4.3.2 UPOS String Parser ........................................................................................... 68 4.3.3 Limits .................................................................................................................. 68

Page 4: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Table of contents Interface for RIK Printer Module

ii 6.110.95.1.1.022

4.3.4 Bizerba text extensions – Basic types of fields ................................................... 69 4.3.5 Bizerba Text Extensions - Field IDs with basic types ......................................... 70

4.3.6 Fonts .................................................................................................................. 73 4.3.7 Label printout - Escape sequences .................................................................... 74

4.3.8 Bizerba Text Extensions _ Text formatting with Escape sequences .................. 75 4.3.9 Barcodes ............................................................................................................ 78 4.3.10 Extended Error Codes ........................................................................................ 78 4.3.11 Firmware Updates .............................................................................................. 79 4.3.12 Multi-Printer-Support .......................................................................................... 79

4.3.13 Paper end ........................................................................................................... 79 4.4 Asynchronous printing ........................................................................................ 79

5 DETAILED DESCRIPTIONS ........................................................... 81

5.1 Paper handling / feeding .................................................................................... 81 5.1.1 Label-Print on labels (using an xml-layout file) ................................................... 81 5.1.2 Label-Print on ticket-paper (using an xml-layout file) .......................................... 84 5.1.3 Ticket-Print (without using an xml-layout file) ..................................................... 85

5.1.4 Parameters for paper- and layout- handling ....................................................... 87 5.1.5 Status Update Event .......................................................................................... 89

5.1.6 Paper Near End .................................................................................................. 89 5.2 Specifying the layout via the API ........................................................................ 90 5.2.1 Uniqueness of the fields ..................................................................................... 90

5.2.2 Text Attributes / Formatting text ......................................................................... 90 5.3 Barcodes ............................................................................................................ 90

5.4 Locale Support (Right to left rendering order) .................................................... 90 5.5 Support of implementation for regulatory/legal demands of public authorities ... 90

5.5.1 Dynamic visibility checks of fields of a layout (POSPrinter) ................................ 91 5.5.2 Static visibility checks of fields of a layout (POSScale) ...................................... 91

5.5.3 Bizerba Defaults ................................................................................................. 93 5.6 Paper saving with AUTOSIZE ............................................................................ 94 5.6.1 Auto sizing on layout-level .................................................................................. 94

5.6.2 Auto sizing on field-level ..................................................................................... 95 5.7 TrueType support (beginning with V 2.62) ......................................................... 96 5.7.1 General description ............................................................................................ 96

5.7.2 Feature description ............................................................................................. 96 5.7.2.1 Proportional Fonts ........................................................................................ 97 5.7.2.2 Support of Italic ............................................................................................ 97 5.7.2.3 Bizerba Escape Sequences ......................................................................... 97

6 APPENDIX ...................................................................................... 98

6.1 Constants ........................................................................................................... 98 6.1.1 Failure ................................................................................................................ 98 6.1.2 UPOSlibPrintBitmap / UPOSlibSetBitmap / PrintNormal .................................... 98 6.1.3 Firmwareupdate ................................................................................................. 98 6.1.4 UPOSlibPrintBarcode / PrintNormal ................................................................... 99 6.1.5 UPOSlibPageModePrint ................................................................................... 100 6.2 Sample Code .................................................................................................... 100

Page 5: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Table of contents

6.110.95.1.1.022 iii

6.2.1 Sample for label print ....................................................................................... 100 6.2.2 Basic functioning of UPOSlib ........................................................................... 102

6.2.3 Use cases ......................................................................................................... 102 6.3 Logfiles and Tracing ......................................................................................... 104

Page 6: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2
Page 7: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module About these instructions

6.110.95.1.1.022 1

1 About these instructions This data description was prepared with great care. If errors or omissions are still to be found, we would be very grateful if you could inform us. The focus of the content of this documentation is on the description of data structures and their content. Our products are constantly further developed and are subject to various country-specific regulations. Examples of pictures and graphics included in these instructions may vary from the version which you receive.

1.1 Target group Programming skills and knowledge of interfaces are required for using this software.

1.2 Additional applicable documents To understand individual tables, knowledge about the corresponding scales functions and operating processes is unavoidable.

1.3 Symbols used Various symbols are used in these instructions.

Notes:

Observance of these notes is mandatory.

Information:

This information is provided for greater understanding.

1.4 Presentation and layout

1.4.1 Technical terms Technical terms mentioned for the first time in this document are shown in italics and expressed in a way which everyone can understand. Thereafter only the technical term is used.

Page 8: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

About the software Interface for RIK Printer Module

2 6.110.95.1.1.022

2 About the software

2.1 History

Version Date Description

2.01 14.10.2010

2.10 03.11.2010 Changed: barcodes Ruhezone Added: DirectIO 38-40

2.10 22.11.2010 Split Setup to OPOS and JPOS specific install.

Added reference images for Hebrew.

Fixed label-printer reference to be the 3inch dot-bar.

Added docu for paper config.

Change: Default for reversing distance has changed from 80 dots to 72 dots to match the preprint length in non- reversing mode (preprint of head-area to increase speed).

Description on reversing

Detailed: handling the paper end

2.29 23.08.2011 Added comment for ^O and ^L formatters Changed page numbering

2.31

26.09.2011 New: 5.5.1 Dynamic visibility checks of fields of a layout (POSPrinter) 5.5.2 Static visibility checks of fields of a layout (POSScale) 5.5.3 Bizerba Defaults

2.31 26.08.2011 Added 5.1.4 Parameters for paper- and layout- handling Deprecated DirectIO 21, 26, 33 Updated 4.3.1 DirectIO constants Updated 5.5 Support of implementation for regulatory/legal demands of public authorities

2.31 26.09.2011 Updated 4.1 Overview

2.34 26.10.2011 Updated 4.3.1 DirectIO constants SetPrinterSpeed Implemented methods: ResultCode, ResultCodeExtended, State,

ServiceObjectDescription Added support for asynchronous printing: AsyncMode, FreezeEvents, OutputID, FlagWhenIdle New: 4.4 Asynchronous printing Updated 4.2 Interface description, 4.2.1

2.35 14.11.2011 Fixed typo: depricated => deprecated

2.36 09.12.2011 Implemented: UPOS_BIZ_EPTR_NOLABELFOUND, UPOS_BIZ_EPTR_PAPER_REMOVED_AFTER_LABELFOUND

2.37 20.01.2012 Updated: 4.3.9 Barcodes, added GS1 Codes

2.38 15.02.2012 Updated: 4.3.3 Updated: 5.3 Barcodes Updated: 5.6.1 Auto sizing on layout-level

2.39 28.02.2012 Updated: 5.3 Barcodes

2.43 09.07.2012 Updated: 4.3.1 DirectIO constants 45-58

2.50? 13.07.2012 Added: 5.1.5 Status Update Event

Page 9: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module About the software

6.110.95.1.1.022 3

2.53? 18.09.2012 Added: 4.3.10 Extended Error Codes Updated: 5.1 Paper handling / feeding Removed:UPOS_BIZ_EPTR_PAPER_REMOVED_AFTER_LABELFOUND

2.56? 18.02.2013 Updated: Deleted in 5.3 Barcodes: Barcodes can only be left-aligned, or printed with an offset from the left. Updated: 6.2.1 Sample for label print Updated: 6.3 Logfiles and Tracing Queuing of feed-commands: Updated: 5.1.1 Label-Print on labels (using an xml-layout file) Updated: 5.1.2 Label-Print on ticket-paper (using an xml-layout file) Updated: 5.1.3 Ticket-Print (without using an xml-layout file) New: feeding to revert from paper-out is no longer necessary after learnmode has been performed.

2.57? 04.04.2013 Updated: 5.1.1 Label-Print on labels (using an xml-layout file) Updated: 5.1.2 Label-Print on ticket-paper (using an xml-layout file), Caution with Reversing

2.59? 13.06.2013 Updated 4.3.1 DirectIO constants: added DirectIO 59 (GetPrintBarResolution), updated DirectIO 38

2.61 30.09.2013 Updated 4.3.1 DirectIO constants: added DirectIO 60-73 (Paper Near End) added 5.1.6 Paper Near End

2.62 03.02.2014 Added 5.7 TrueType support (beginning with V 2.62) Updated 4.3.8 Bizerba Text Extensions _ Text formatting with Escape sequences Updated 4.3.3Limits

Page 10: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

About the software Interface for RIK Printer Module

4 6.110.95.1.1.022

2.2 POS-Printer Modules OPOS API

JPOS API

2.3 Rights All rights regarding this documentation and the software program are held by Bizerba. The information in these instructions can be modified without providing any special notice. Bizerba cannot be held liable for these instructions.

2.3.1 Third-party software The software provided by Bizerba may also include more software and software components (third software) which are subject to special license conditions. This can be especially software from Open-Source-Communities. The third-party software may only be used in accordance with the respective license conditions listed. The license conditions by Bizerba do not apply to third software insofar as they contradict the respective valid license conditions of third software.

The customer is obliged to copy the file third_party.txt to the target

system during installation of files

The POS-Printer component consists of the following parts:

Page 11: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module About the software

6.110.95.1.1.022 5

BLD-Library

Software (Name) Lizenz

Jpeg Library (IJG) 6b Jpeg Library License

Libpng 1.2.24 libpng License

zlib 1.2.3 zlib License

CxImage 6.00 zlib License

MD5 MD5 Lizenz

Hydra-Library

Software (Name) Lizenz

Jpeg Library (IJG) 6b Jpeg Library 6b License

zlib 1.2.3 zlib License

AES Reference Implementation in

C

Hoozi License for AES Reference

Implementation in C

Boost 1.33.1 Boost Software Licence 1.0

ICU 3.8 ICU License

Libxml2 2.6.28 MIT License

UUID Library Boost Software Licence 1.0

Jpeg Library (IJG) 8b Jpeg Library 8b License

libpng 1.2.35 libpng License

RIK-POSPrinter 2.00:

Software (Name) Lizenz

OPOS Referenzimplementierung

von Monroe

Monroes OPOS Lizenz

Apache Xerces2 Yesva 2.10.0 Apache Software License 2.0

Page 12: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

About the software Interface for RIK Printer Module

6 6.110.95.1.1.022

2.4 Operating conditions

2.4.1 Hardware requirements USB port or CD/DVD drive or network is required for an installation/update.

Network:

Computer:

Requirement

Processor

RAM

Hard disk

2.4.2 Software requirement

Requirement

Operating system OPOS API: WePOS + POSReady

JPOS API: WePOS + POSReady + SlePOS

Licensing

User rights Installation to be performed as a user with administrator rights.

Assumptions: - Only Bizerba Unicode fonts, no codepage based fonts. - On the customer side the assignment of field number and type must be known

and must be taken into consideration. This means the IDs transmitted with the data must match the field types.

- No implementation of asychronuous printing - A reference implemenatation of OPOS control objects, based on a Monroe

implemenatation, is delivered in a bizerba version. - The layout- XML-Files must be created with a BLD > Version 6.01 - For JPOS Java Version must be > 1.5 (tested with OpenJDK 1.6) - (no precautions for welmec have been taken => responsibility of the controlling

application) - There is no defined sequence for rendering the fields - Tests are done with Kratos-Printers (not Cogos) - No 64bit operating systems

Page 13: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module About the software

6.110.95.1.1.022 7

2.5 Warranty In spite of all efforts, errors in such an instruction cannot be entirely prevented. We welcome your feedback and suggestions at any time. We are not responsible for damages caused by: - Non-observance of these operating instructions. - Incorrect electrical installation by customer. - Changes to the operating system and its configuration as well as changes to our software and its configuration. This warranty does not cover defects / damage caused by unauthorized persons. We are not liable for problems that arise from using this product. Please note that changes to technical data of the product are subject to change without advance notice. Our products are constantly further developed and are subject to various country-specific regulations. Examples of pictures and graphics included in these instructions may vary from the version which you receive.

2.6 Virus protection This software is manufactured and supplied without viruses based on the latest technology. However, there is always a possibility that a computer may be contaminated by computer viruses or other damaging software. For your own safety, we recommend to run an anti-virus software on your computer on a regular basis and after loading software. Furthermore, we recommend to check on viruses after loading software of other manufacturers or data carriers. We recommend that you purchase an anti-virus program for virus analysis, which is constantly updated to the latest status.

Page 14: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Installation Interface for RIK Printer Module

8 6.110.95.1.1.022

3 Installation Users or user groups must have full access to the relevant directories and resources:

Windows Requirements:

[CSIDL_COMMON_APPDATA]\Bizerba\CommonData\

Linux Requirements:

/etc/opt/bizerba/commondata/

/dev/shm

/dev/biz* By default this is valid if the processes are run as user “scale”.

3.1 Before installation Ensure that the computer conforms to the requirements of the installation. Before the installation, close all running programs.

3.2 Installation

The POS-Printer component is part of the RIK package. Installation is provided through the package installer script “bizinstaller.cmd” or “bizinstaller.sh” which calls the component specific scripts.

On any installation the customer must copy the file third_party.txt to the

target system during installation of the RIK-Component. This is necessary to fulfill the licensing requirements of the used modules. For the correct work of the software it must be guarantee that the user has read/write access to the configuration file. The configuration file is stored under Windows in [CSIDL_COMMON_APPDATA]\Bizerba\CommonData\

e.g. C:\Documents and Settings\All Users\Application

Data\Bizerba\CommonData

and under Linux /etc/opt/bizerba/commondata/

Normally this is done by the installation scripts.

3.2.1 Installation under w32

1) Login with administrative privileges 2) Move to the directory where the package was unzipped 3) The installer assumes that java is already installed. If this is true you can

continue with 6)

4) Install OpenJDK. Since V2.20 OpenJDK is no longer provided. 5) Logoff and Login again.

6) To install the JPOS package call install_jpos.cmd

To install the OPOS package call install_opos.cmd

Page 15: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Installation

6.110.95.1.1.022 9

3.2.2 Installation under Linux

1) Login as root 2) Move to the directory where the package was unzipped 3) The installer assumes that java is already installed. If this is true you can

continue with 5)

4) Install OpenJDK. Since V2.20 OpenJDK is no longer provided. 5) To install the JPOS package call “install_jpos.sh”.

3.3 Demo program / Test scripts You need a ticket printer for running the main tests. - bitmaps of the printouts are stored in test_data - the reference bitmaps are in test_data/ref_ticket - you can find detailed logdata in test_data/tests.log Linux Ticket-Printer-Tests:

1) go to a directory where you have write permission 2) call “/opt/bizerba/posprinter/linux_x86/copy_tests_to_me.sh”

3) to restart the tests: cd test_data 4) To call the JPOS tests: call tests_ticket.sh JPOS

Windows Ticket-Printer-Tests:

1) go to a directory where you have write permission 2) call “C:\Program Files\Bizerba\posprinter\winnt_x86\copy_tests_to_me.cmd”

3) to restart the tests: cd test_data 4) To start JPOS tests: call tests_ticket.cmd JPOS

To start OPOS tests: call tests_ticket.cmd OPOS

The reference-bitmaps are stored in the folders ref_* of the test_data directory. Only on a Kratos - Printer - Hardware the images will match exactly, because of the 3-inch printbar.

3.4 Update The POS-Printer installer scripts detect an installed version via the configuration-file and do only an update if the installing component is newer.

3.5 Uninstall 1) On Windows login as administrator and call “uninstall.cmd 2) On Linux login as root and call “uninstall.sh”

Page 16: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

10 6.110.95.1.1.022

4 Functional and data description

4.1 Overview

Description of modules The application can access the UPOS functionality either by using the Java API (JPOS) or by using the COM API (OPOS). All results are the same, because the underlying infrastructure is the same. For simplification of the printing code an XML layout description can be used (exported from the Bizerba-Label-Designer).

JPOS API CO / SO

OPOS API CO / SO

ARTs API

.jar .ocx

UPOS Implementation

Drivers

Hardware

Application

XML-Layout

Page 17: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 11

4.2 Interface description In this chapter you can find the available APIs of OPOS and JPOS listed. These APIs are implemented as wrappers of the UPOS API. For using and understanding a method in JPOS / OPOS please check the description in the UPOS chapter 4.2.3.

Page 18: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

12 6.110.95.1.1.022

JPOS/OPOS interface Descripton of accessible properties Properties that are not listed here are not accessible or usable.

AsyncMode

BinaryConversion (nur OPOS) Always returns OPOS_BC_NONE

CapRec2Color Always returns false

CapRecBarCode Always returns true

CapRecBitmap Always returns true

CapRecBold Always returns true

CapRecDhigh Always returns true

CapRecDwide Always returns true

CapRecDwideDhigh Always returns true

CapRecEmptySensor Always returns true

CapRecItalic returns true from 2.62 and later.

CapRecLeft90 Always returns false

CapRecNearEndSensor Always returns false

CapRecPapercut Always returns false

CapRecPresent Always returns true

CapRecRight90 Always returns false

CapRecRotate180 Always returns false

CapRecStamp Always returns false

CapRecUnderline Always returns true

CharacterSet Reading: returns PTR_CS_UNICODE Writing: returns error

CharacterSet List Reading: returns 997

CoverOpen Always returns false

ErrorStation Always returns PTR_S_RECEIPT

MapMode Always returns PTR_MM_DOTS

RecEmpty

CapCharacterSet Returns PTR_CCS_UNICODE

CapTransaction

FontTypefaceList Returns CSV list

Page 19: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 13

CapMapCharacterSet Always returns false

RecBitmapRotationList Always returns “0”

CapStatisticsReporting Always returns false

CapUpdateFirmware

CapRecPageMode Always returns true

CapCompareFirmwareVersio

n

CapRecRuledLine Always returns false

DeviceEnabled

FlagWhenIdle When set to true, PrintNormal, PrintBitmap, PrintBarcode and PageModePrint(PTR_PM_NORMAL), PageModePrint(PTR_PM_PRINT_SAVE) wait until the ticket has been printed, then an UpdateStatus Event is sent.

CapRecColor Returns always PTR_COLOR_PRIMARY

RotateSpecial Returns always PTR_RP_NORMAL

RecLetterQuality Always returns true

RecLineSpacing Always returns 0

RecLineWidth Always returns 0

RecLineHeight Always returns 0

RecSidewaysMaxChars Always returns 0

RecSidewaysMaxLines Always returns 0

RecCurrentCartridge Returns always PTR_COLOR_PRIMARY, setting is ignored

CapRecCartridgeSensor Always returns 0

CapRecMarkFeed Always returns 0

CartridgeNotify Always returns PTR_CN_DISABLED

RecCartridgeState Always returns PTR_CART_UNKNOWN

PageModeDescriptor Always returns 0

PageModeHorizontalposition Always returns 0, setting is ignored

PageModePrintDirection PTR_PD_LEFT_TO_RIGHT, setting is ignored

Page 20: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

14 6.110.95.1.1.022

PageModeStation Always returns 0, setting is ignored

PageModeVerticalPosition Is implemented beginning with V2.30

PageModePrintArea Always returns “0,0,0,0” , setting is ignored

PageModeArea Always returns “”

RecBarCodeRotationList Always returns “0”

RecBitmapRotationList Always returns “0”

CapJrn2Color Always returns false

CapJrn2Color Always returns false

CapJrnBold Always returns false

CapJrnDhigh Always returns false

CapJrnDwide Always returns false

CapJrnDwideDhigh Always returns false

CapJrnEmptySensor Always returns false

CapJrnItalic Always returns false

CapJrnNearEndSensor Always returns false

CapJrnUnderline Always returns false

CapSlp2Color Always returns false

CapSlpBarCode Always returns false

CapSlpBitmap Always returns false

CapSlpBold Always returns false

CapSlpDhigh Always returns false

CapSlpDwide Always returns false

CapSlpDwideDhigh Always returns false

CapSlpEmptySensor Always returns false

CapSlpFullslip Always returns false

CapSlpItalic Always returns false

CapSlpLeft90 Always returns false

CapSlpNearEndSensor Always returns false

CapSlpRight90 Always returns false

CapSlpRotate180 Always returns false

CapSlpUnderline Always returns false

Page 21: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 15

CapPowerReporting Always returns PTR_PR_NONE

PowerState Always returns PTR_PS_UNKNOWN

PowerNotify Always returns PTR_PN_DISABLED

CapJrnCartridgeSensor Always returns 0

CapJrnColor Always returns 0

CapSlpBothSidesPrint Always returns false

CapSlpCartridgeSensor Always returns 0

CapSlpColor Always returns 0

CapStatisticsReporting Always returns 0

CapUpdateStatistics Always returns false

CapSlpPageMode Always returns false

OutputID

CapCoverSensor Always returns false

CapSlpPresent Always returns false

CapJrnPresent Always returns false

FreezeEvents Is implemented beginning with V2.34

AsyncMode Is implemented beginning with V2.34

FlagWhenIdle Is implemented beginning with V2.34

OutputID Is implemented beginning with V2.34

4.2.1 Overview which methods of the OPOS interface are implemented: Interface methods / Function of printer control objects

Implementiert in Bizerba

ReleaseV1.0 interface IOPOSPOSPrinter_1_5 : IDispatch

{

// Methods for use only by the Service Object

[id(1), hidden, helpstring("method SODataDummy")] HRESULT SODataDummy( [in] long Status ); No

[id(2), hidden, helpstring("method SODirectIO")]

HRESULT SODirectIO( [in] long EventNumber, [in, out] long* pData, [in, out] BSTR* pString ); No

[id(3), hidden, helpstring("method SOError")]

HRESULT SOError( [in] long ResultCode, [in] long ResultCodeExtended, No

Page 22: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

16 6.110.95.1.1.022

[in] long ErrorLocus, [in, out] long* pErrorResponse );

[id(4), hidden, helpstring("method SOOutputComplete")]

HRESULT SOOutputComplete( [in] long OutputID ); No

[id(5), hidden, helpstring("method SOStatusUpdate")]

HRESULT SOStatusUpdate( [in] long Data ); No

[id(9), hidden, helpstring("method SOProcessID")]

HRESULT SOProcessID( [out, retval] long* pProcessID ); No

// Release 1.0

[propget, id(49), helpstring("property OpenResult")]

HRESULT OpenResult( [out, retval] long* pOpenResult ); No

[propget, id(13), helpstring("property CheckHealthText")]

HRESULT CheckHealthText( [out, retval] BSTR* pCheckHealthText ); Yes

[propget, id(14), helpstring("property Claimed")]

HRESULT Claimed( [out, retval] VARIANT_BOOL* pClaimed ); Yes

[propget, id(17), helpstring("property DeviceEnabled")]

HRESULT DeviceEnabled( [out, retval] VARIANT_BOOL* pDeviceEnabled ); Yes

[propput, id(17), helpstring("property DeviceEnabled")]

HRESULT DeviceEnabled( [in] VARIANT_BOOL DeviceEnabled ); Yes

[propget, id(18), helpstring("property FreezeEvents")]

HRESULT FreezeEvents( [out, retval] VARIANT_BOOL* pFreezeEvents ); Yes

[propput, id(18), helpstring("property FreezeEvents")]

HRESULT FreezeEvents( [in] VARIANT_BOOL FreezeEvents ); Yes

[propget, id(19), helpstring("property OutputID")]

HRESULT OutputID( [out, retval] long* pOutputID ); Yes

[propget, id(22), helpstring("property ResultCode")]

HRESULT ResultCode( [out, retval] long* pResultCode ); Yes

[propget, id(23), helpstring("property ResultCodeExtended")]

HRESULT ResultCodeExtended( [out, retval] long* pResultCodeExtended ); Yes

[propget, id(24), helpstring("property State")]

HRESULT State( [out, retval] long* pState ); Yes

[propget, id(25), helpstring("property ControlObjectDescription")]

HRESULT ControlObjectDescription( [out, retval] BSTR* pControlObjectDescription ); No

[propget, id(26), helpstring("property ControlObjectVersion")]

HRESULT ControlObjectVersion( [out, retval] long* pControlObjectVersion ); No

Page 23: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 17

[propget, id(27), helpstring("property ServiceObjectDescription")]

HRESULT ServiceObjectDescription( [out, retval] BSTR* pServiceObjectDescription ); Yes

[propget, id(28), helpstring("property ServiceObjectVersion")]

HRESULT ServiceObjectVersion( [out, retval] long* pServiceObjectVersion ); Yes

[propget, id(29), helpstring("property DeviceDescription")]

HRESULT DeviceDescription( [out, retval] BSTR* pDeviceDescription ); No

[propget, id(30), helpstring("property DeviceName")]

HRESULT DeviceName( [out, retval] BSTR* pDeviceName ); No

[id(31), helpstring("method CheckHealth")]

HRESULT CheckHealth(

[in] long Level,

[out, retval] long* pRC );

Yes

[id(32), helpstring("method ClaimDevice")]

HRESULT ClaimDevice(

[in] long Timeout,

[out, retval] long* pRC );

Yes

[id(34), helpstring("method ClearOutput")]

HRESULT ClearOutput(

[out, retval] long* pRC ); Yes

[id(35), helpstring("method Close")]

HRESULT Close(

[out, retval] long* pRC ); Yes

[id(36), helpstring("method DirectIO")]

HRESULT DirectIO(

[in] long Command,

[in, out] long* pData,

[in, out] BSTR* pString,

[out, retval] long* pRC );

Yes

[id(37), helpstring("method Open")]

HRESULT Open(

[in] BSTR DeviceName,

[out, retval] long* pRC );

Yes

Page 24: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

18 6.110.95.1.1.022

[id(38), helpstring("method ReleaseDevice")]

HRESULT ReleaseDevice(

[out, retval] long* pRC ); Yes

[propget, id(50), helpstring("property AsyncMode")]

HRESULT AsyncMode( [out, retval] VARIANT_BOOL* pAsyncMode ); Yes

[propput, id(50), helpstring("property AsyncMode")]

HRESULT AsyncMode( [in] VARIANT_BOOL AsyncMode ); Yes

[propget, id(52), helpstring("property CapConcurrentJrnRec")]

HRESULT CapConcurrentJrnRec( [out, retval] VARIANT_BOOL* pCapConcurrentJrnRec ); No

[propget, id(53), helpstring("property CapConcurrentJrnSlp")]

HRESULT CapConcurrentJrnSlp( [out, retval] VARIANT_BOOL* pCapConcurrentJrnSlp ); No

[propget, id(54), helpstring("property CapConcurrentRecSlp")]

HRESULT CapConcurrentRecSlp( [out, retval] VARIANT_BOOL* pCapConcurrentRecSlp ); No

[propget, id(55), helpstring("property CapCoverSensor")]

HRESULT CapCoverSensor( [out, retval] VARIANT_BOOL* pCapCoverSensor ); No

[propget, id(56), helpstring("property CapJrn2Color")]

HRESULT CapJrn2Color( [out, retval] VARIANT_BOOL* pCapJrn2Color ); No

[propget, id(57), helpstring("property CapJrnBold")]

HRESULT CapJrnBold( [out, retval] VARIANT_BOOL* pCapJrnBold ); No

[propget, id(58), helpstring("property CapJrnDhigh")]

HRESULT CapJrnDhigh( [out, retval] VARIANT_BOOL* pCapJrnDhigh ); No

[propget, id(59), helpstring("property CapJrnDwide")]

HRESULT CapJrnDwide( [out, retval] VARIANT_BOOL* pCapJrnDwide ); No

[propget, id(60), helpstring("property CapJrnDwideDhigh")]

HRESULT CapJrnDwideDhigh( [out, retval] VARIANT_BOOL* pCapJrnDwideDhigh ); No

[propget, id(61), helpstring("property CapJrnEmptySensor")]

HRESULT CapJrnEmptySensor( [out, retval] VARIANT_BOOL* pCapJrnEmptySensor ); No

[propget, id(62), helpstring("property CapJrnItalic")]

HRESULT CapJrnItalic( [out, retval] VARIANT_BOOL* pCapJrnItalic ); No

[propget, id(63), helpstring("property CapJrnNearEndSensor")]

HRESULT CapJrnNearEndSensor( [out, retval] VARIANT_BOOL* pCapJrnNearEndSensor ); No

[propget, id(64), helpstring("property CapJrnPresent")]

HRESULT CapJrnPresent( [out, retval] VARIANT_BOOL* pCapJrnPresent ); No

[propget, id(65), helpstring("property CapJrnUnderline")]

HRESULT CapJrnUnderline( [out, retval] VARIANT_BOOL* pCapJrnUnderline ); No

Page 25: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 19

[propget, id(66), helpstring("property CapRec2Color")]

HRESULT CapRec2Color( [out, retval] VARIANT_BOOL* pCapRec2Color ); No

[propget, id(67), helpstring("property CapRecBarCode")]

HRESULT CapRecBarCode( [out, retval] VARIANT_BOOL* pCapRecBarCode ); Yes

[propget, id(68), helpstring("property CapRecBitmap")]

HRESULT CapRecBitmap( [out, retval] VARIANT_BOOL* pCapRecBitmap ); Yes

[propget, id(69), helpstring("property CapRecBold")]

HRESULT CapRecBold( [out, retval] VARIANT_BOOL* pCapRecBold ); Yes

[propget, id(70), helpstring("property CapRecDhigh")]

HRESULT CapRecDhigh( [out, retval] VARIANT_BOOL* pCapRecDhigh ); No

[propget, id(71), helpstring("property CapRecDwide")]

HRESULT CapRecDwide( [out, retval] VARIANT_BOOL* pCapRecDwide ); Yes

[propget, id(72), helpstring("property CapRecDwideDhigh")]

HRESULT CapRecDwideDhigh( [out, retval] VARIANT_BOOL* pCapRecDwideDhigh ); Yes

[propget, id(73), helpstring("property CapRecEmptySensor")]

HRESULT CapRecEmptySensor( [out, retval] VARIANT_BOOL* pCapRecEmptySensor ); Yes

[propget, id(74), helpstring("property CapRecItalic")]

HRESULT CapRecItalic( [out, retval] VARIANT_BOOL* pCapRecItalic ); No

[propget, id(75), helpstring("property CapRecLeft90")]

HRESULT CapRecLeft90( [out, retval] VARIANT_BOOL* pCapRecLeft90 ); No

[propget, id(76), helpstring("property CapRecNearEndSensor")]

HRESULT CapRecNearEndSensor( [out, retval] VARIANT_BOOL* pCapRecNearEndSensor ); No

[propget, id(77), helpstring("property CapRecPapercut")]

HRESULT CapRecPapercut( [out, retval] VARIANT_BOOL* pCapRecPapercut ); No

[propget, id(78), helpstring("property CapRecPresent")]

HRESULT CapRecPresent( [out, retval] VARIANT_BOOL* pCapRecPresent ); Yes

[propget, id(79), helpstring("property CapRecRight90")]

HRESULT CapRecRight90( [out, retval] VARIANT_BOOL* pCapRecRight90 ); No

[propget, id(80), helpstring("property CapRecRotate180")]

HRESULT CapRecRotate180( [out, retval] VARIANT_BOOL* pCapRecRotate180 ); No

[propget, id(81), helpstring("property CapRecStamp")]

HRESULT CapRecStamp( [out, retval] VARIANT_BOOL* pCapRecStamp ); No

Page 26: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

20 6.110.95.1.1.022

[propget, id(82), helpstring("property CapRecUnderline")]

HRESULT CapRecUnderline( [out, retval] VARIANT_BOOL* pCapRecUnderline ); Yes

[propget, id(83), helpstring("property CapSlp2Color")]

HRESULT CapSlp2Color( [out, retval] VARIANT_BOOL* pCapSlp2Color ); No

[propget, id(84), helpstring("property CapSlpBarCode")]

HRESULT CapSlpBarCode( [out, retval] VARIANT_BOOL* pCapSlpBarCode ); No

[propget, id(85), helpstring("property CapSlpBitmap")]

HRESULT CapSlpBitmap( [out, retval] VARIANT_BOOL* pCapSlpBitmap ); No

[propget, id(86), helpstring("property CapSlpBold")]

HRESULT CapSlpBold( [out, retval] VARIANT_BOOL* pCapSlpBold ); No

[propget, id(87), helpstring("property CapSlpDhigh")]

HRESULT CapSlpDhigh( [out, retval] VARIANT_BOOL* pCapSlpDhigh ); No

[propget, id(88), helpstring("property CapSlpDwide")]

HRESULT CapSlpDwide( [out, retval] VARIANT_BOOL* pCapSlpDwide ); No

[propget, id(89), helpstring("property CapSlpDwideDhigh")]

HRESULT CapSlpDwideDhigh( [out, retval] VARIANT_BOOL* pCapSlpDwideDhigh ); No

[propget, id(90), helpstring("property CapSlpEmptySensor")]

HRESULT CapSlpEmptySensor( [out, retval] VARIANT_BOOL* pCapSlpEmptySensor ); No

[propget, id(91), helpstring("property CapSlpFullslip")]

HRESULT CapSlpFullslip( [out, retval] VARIANT_BOOL* pCapSlpFullslip ); No

[propget, id(92), helpstring("property CapSlpItalic")]

HRESULT CapSlpItalic( [out, retval] VARIANT_BOOL* pCapSlpItalic ); No

[propget, id(93), helpstring("property CapSlpLeft90")]

HRESULT CapSlpLeft90( [out, retval] VARIANT_BOOL* pCapSlpLeft90 ); No

[propget, id(94), helpstring("property CapSlpNearEndSensor")]

HRESULT CapSlpNearEndSensor( [out, retval] VARIANT_BOOL* pCapSlpNearEndSensor ); No

[propget, id(95), helpstring("property CapSlpPresent")]

HRESULT CapSlpPresent( [out, retval] VARIANT_BOOL* pCapSlpPresent ); No

[propget, id(96), helpstring("property CapSlpRight90")]

HRESULT CapSlpRight90( [out, retval] VARIANT_BOOL* pCapSlpRight90 ); No

[propget, id(97), helpstring("property CapSlpRotate180")]

HRESULT CapSlpRotate180( [out, retval] VARIANT_BOOL* pCapSlpRotate180 ); No

[propget, id(98), helpstring("property CapSlpUnderline")]

HRESULT CapSlpUnderline( [out, retval] VARIANT_BOOL* pCapSlpUnderline ); No

Page 27: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 21

[propget, id(100), helpstring("property CharacterSet")]

HRESULT CharacterSet( [out, retval] long* pCharacterSet ); Yes

[propput, id(100), helpstring("property CharacterSet")]

HRESULT CharacterSet( [in] long CharacterSet ); Yes

[propget, id(101), helpstring("property CharacterSetList")]

HRESULT CharacterSetList( [out, retval] BSTR* pCharacterSetList ); Yes

[propget, id(102), helpstring("property CoverOpen")]

HRESULT CoverOpen( [out, retval] VARIANT_BOOL* pCoverOpen ); No

[propget, id(104), helpstring("property ErrorStation")]

HRESULT ErrorStation( [out, retval] long* pErrorStation ); No

[propget, id(106), helpstring("property FlagWhenIdle")]

HRESULT FlagWhenIdle( [out, retval] VARIANT_BOOL* pFlagWhenIdle ); Yes

[propput, id(106), helpstring("property FlagWhenIdle")]

HRESULT FlagWhenIdle( [in] VARIANT_BOOL FlagWhenIdle ); Yes

[propget, id(108), helpstring("property JrnEmpty")]

HRESULT JrnEmpty( [out, retval] VARIANT_BOOL* pJrnEmpty ); No

[propget, id(109), helpstring("property JrnLetterQuality")]

HRESULT JrnLetterQuality( [out, retval] VARIANT_BOOL* pJrnLetterQuality ); No

[propput, id(109), helpstring("property JrnLetterQuality")]

HRESULT JrnLetterQuality( [in] VARIANT_BOOL JrnLetterQuality ); No

[propget, id(110), helpstring("property JrnLineChars")]

HRESULT JrnLineChars( [out, retval] long* pJrnLineChars ); No

[propput, id(110), helpstring("property JrnLineChars")]

HRESULT JrnLineChars( [in] long JrnLineChars ); No

[propget, id(111), helpstring("property JrnLineCharsList")]

HRESULT JrnLineCharsList( [out, retval] BSTR* pJrnLineCharsList ); No

[propget, id(112), helpstring("property JrnLineHeight")]

HRESULT JrnLineHeight( [out, retval] long* pJrnLineHeight ); No

[propput, id(112), helpstring("property JrnLineHeight")]

HRESULT JrnLineHeight( [in] long JrnLineHeight ); No

[propget, id(113), helpstring("property JrnLineSpacing")]

HRESULT JrnLineSpacing( [out, retval] long* pJrnLineSpacing ); No

Page 28: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

22 6.110.95.1.1.022

[propput, id(113), helpstring("property JrnLineSpacing")]

HRESULT JrnLineSpacing( [in] long JrnLineSpacing ); No

[propget, id(114), helpstring("property JrnLineWidth")]

HRESULT JrnLineWidth( [out, retval] long* pJrnLineWidth ); No

[propget, id(115), helpstring("property JrnNearEnd")]

HRESULT JrnNearEnd( [out, retval] VARIANT_BOOL* pJrnNearEnd ); No

[propget, id(116), helpstring("property MapMode")]

HRESULT MapMode( [out, retval] long* pMapMode ); No

[propput, id(116), helpstring("property MapMode")]

HRESULT MapMode( [in] long MapMode ); No

[propget, id(118), helpstring("property RecEmpty")]

HRESULT RecEmpty( [out, retval] VARIANT_BOOL* pRecEmpty ); Yes

[propget, id(119), helpstring("property RecLetterQuality")]

HRESULT RecLetterQuality( [out, retval] VARIANT_BOOL* pRecLetterQuality ); No

[propput, id(119), helpstring("property RecLetterQuality")]

HRESULT RecLetterQuality( [in] VARIANT_BOOL RecLetterQuality ); No

[propget, id(120), helpstring("property RecLineChars")]

HRESULT RecLineChars( [out, retval] long* pRecLineChars ); No

[propput, id(120), helpstring("property RecLineChars")]

HRESULT RecLineChars( [in] long RecLineChars ); No

[propget, id(121), helpstring("property RecLineCharsList")]

HRESULT RecLineCharsList( [out, retval] BSTR* pRecLineCharsList ); No

[propget, id(122), helpstring("property RecLineHeight")]

HRESULT RecLineHeight( [out, retval] long* pRecLineHeight ); No

[propput, id(122), helpstring("property RecLineHeight")]

HRESULT RecLineHeight( [in] long RecLineHeight ); No

[propget, id(123), helpstring("property RecLineSpacing")]

HRESULT RecLineSpacing( [out, retval] long* pRecLineSpacing ); No

[propput, id(123), helpstring("property RecLineSpacing")]

HRESULT RecLineSpacing( [in] long RecLineSpacing ); No

[propget, id(124), helpstring("property RecLinesToPaperCut")]

HRESULT RecLinesToPaperCut( [out, retval] long* pRecLinesToPaperCut ); Yes

[propget, id(125), helpstring("property RecLineWidth")]

HRESULT RecLineWidth( [out, retval] long* pRecLineWidth ); No

Page 29: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 23

[propget, id(126), helpstring("property RecNearEnd")]

HRESULT RecNearEnd( [out, retval] VARIANT_BOOL* pRecNearEnd ); No

[propget, id(127), helpstring("property RecSidewaysMaxChars")]

HRESULT RecSidewaysMaxChars( [out, retval] long* pRecSidewaysMaxChars ); No

[propget, id(128), helpstring("property RecSidewaysMaxLines")]

HRESULT RecSidewaysMaxLines( [out, retval] long* pRecSidewaysMaxLines ); No

[propget, id(131), helpstring("property SlpEmpty")]

HRESULT SlpEmpty( [out, retval] VARIANT_BOOL* pSlpEmpty ); No

[propget, id(132), helpstring("property SlpLetterQuality")]

HRESULT SlpLetterQuality( [out, retval] VARIANT_BOOL* pSlpLetterQuality ); No

[propput, id(132), helpstring("property SlpLetterQuality")]

HRESULT SlpLetterQuality( [in] VARIANT_BOOL SlpLetterQuality ); No

[propget, id(133), helpstring("property SlpLineChars")]

HRESULT SlpLineChars( [out, retval] long* pSlpLineChars ); No

[propput, id(133), helpstring("property SlpLineChars")]

HRESULT SlpLineChars( [in] long SlpLineChars ); No

[propget, id(134), helpstring("property SlpLineCharsList")]

HRESULT SlpLineCharsList( [out, retval] BSTR* pSlpLineCharsList ); No

[propget, id(135), helpstring("property SlpLineHeight")]

HRESULT SlpLineHeight( [out, retval] long* pSlpLineHeight ); No

[propput, id(135), helpstring("property SlpLineHeight")]

HRESULT SlpLineHeight( [in] long SlpLineHeight ); No

[propget, id(136), helpstring("property SlpLinesNearEndToEnd")]

HRESULT SlpLinesNearEndToEnd( [out, retval] long* pSlpLinesNearEndToEnd ); No

[propget, id(137), helpstring("property SlpLineSpacing")]

HRESULT SlpLineSpacing( [out, retval] long* pSlpLineSpacing ); No

[propput, id(137), helpstring("property SlpLineSpacing")]

HRESULT SlpLineSpacing( [in] long SlpLineSpacing ); No

[propget, id(138), helpstring("property SlpLineWidth")]

HRESULT SlpLineWidth( [out, retval] long* pSlpLineWidth ); No

[propget, id(139), helpstring("property SlpMaxLines")]

HRESULT SlpMaxLines( [out, retval] long* pSlpMaxLines ); No

[propget, id(140), helpstring("property SlpNearEnd")]

HRESULT SlpNearEnd( [out, retval] VARIANT_BOOL* pSlpNearEnd ); No

Page 30: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

24 6.110.95.1.1.022

[propget, id(141), helpstring("property SlpSidewaysMaxChars")]

HRESULT SlpSidewaysMaxChars( [out, retval] long* pSlpSidewaysMaxChars ); No

[propget, id(142), helpstring("property SlpSidewaysMaxLines")]

HRESULT SlpSidewaysMaxLines( [out, retval] long* pSlpSidewaysMaxLines ); No

[id(160), helpstring("method BeginInsertion")]

HRESULT BeginInsertion(

[in] long Timeout,

[out, retval] long* pRC );

No

[id(161), helpstring("method BeginRemoval")]

HRESULT BeginRemoval(

[in] long Timeout,

[out, retval] long* pRC );

No

[id(162), helpstring("method CutPaper")]

HRESULT CutPaper(

[in] long Percentage,

[out, retval] long* pRC );

No

[id(163), helpstring("method EndInsertion")]

HRESULT EndInsertion(

[out, retval] long* pRC ); No

[id(164), helpstring("method EndRemoval")]

HRESULT EndRemoval(

[out, retval] long* pRC ); No

[id(165), helpstring("method PrintBarCode")]

HRESULT PrintBarCode(

[in] long Station,

[in] BSTR Data,

[in] long Symbology,

[in] long Height,

[in] long Width,

[in] long Alignment,

[in] long TextPosition,

[out, retval] long* pRC );

Yes

Page 31: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 25

[id(166), helpstring("method PrintBitmap")]

HRESULT PrintBitmap(

[in] long Station,

[in] BSTR FileName,

[in] long Width,

[in] long Alignment,

[out, retval] long* pRC );

Yes

[id(167), helpstring("method PrintImmediate")]

HRESULT PrintImmediate(

[in] long Station,

[in] BSTR Data,

[out, retval] long* pRC );

No

[id(168), helpstring("method PrintNormal")]

HRESULT PrintNormal(

[in] long Station,

[in] BSTR Data,

[out, retval] long* pRC );

Yes

[id(169), helpstring("method PrintTwoNormal")]

HRESULT PrintTwoNormal(

[in] long Stations,

[in] BSTR Data1,

[in] BSTR Data2,

[out, retval] long* pRC );

No

[id(170), helpstring("method RotatePrint")]

HRESULT RotatePrint(

[in] long Station,

[in] long Rotation,

[out, retval] long* pRC );

No

Page 32: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

26 6.110.95.1.1.022

[id(171), helpstring("method SetBitmap")]

HRESULT SetBitmap(

[in] long BitmapNumber,

[in] long Station,

[in] BSTR FileName,

[in] long Width,

[in] long Alignment,

[out, retval] long* pRC );

Yes

[id(172), helpstring("method SetLogo")]

HRESULT SetLogo(

[in] long Location,

[in] BSTR Data,

[out, retval] long* pRC );

Yes

// Release 1.1

[propget, id(51), helpstring("property CapCharacterSet")]

HRESULT CapCharacterSet( [out, retval] long* pCapCharacterSet ); Yes

[propget, id(99), helpstring("property CapTransaction")]

HRESULT CapTransaction( [out, retval] VARIANT_BOOL* pCapTransaction ); Yes

[propget, id(103), helpstring("property ErrorLevel")]

HRESULT ErrorLevel( [out, retval] long* pErrorLevel ); No

[propget, id(105), helpstring("property ErrorString")]

HRESULT ErrorString( [out, retval] BSTR* pErrorString ); No

[propget, id(107), helpstring("property FontTypefaceList")]

HRESULT FontTypefaceList( [out, retval] BSTR* pFontTypefaceList ); Yes

[propget, id(117), helpstring("property RecBarCodeRotationList")]

HRESULT RecBarCodeRotationList( [out, retval] BSTR* pRecBarCodeRotationList ); No

[propget, id(129), helpstring("property RotateSpecial")]

HRESULT RotateSpecial( [out, retval] long* pRotateSpecial ); No

[propput, id(129), helpstring("property RotateSpecial")]

HRESULT RotateSpecial( [in] long RotateSpecial ); No

[propget, id(130), helpstring("property SlpBarCodeRotationList")]

HRESULT SlpBarCodeRotationList( [out, retval] BSTR* pSlpBarCodeRotationList ); No

Page 33: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 27

[id(173), helpstring("method TransactionPrint")]

HRESULT TransactionPrint(

[in] long Station,

[in] long Control,

[out, retval] long* pRC );

No

[id(174), helpstring("method ValidateData”)]

HRESULT ValidateData(

[in] long Station,

[in] BSTR Data,

[out, retval] long* pRC );

Yes

// Release 1.2

[propget, id(11), helpstring("property BinaryConversion")]

HRESULT BinaryConversion( [out, retval] long* pBinaryConversion ); Yes

[propput, id(11), helpstring("property BinaryConversion")]

HRESULT BinaryConversion( [in] long BinaryConversion ); No

// Release 1.3

[propget, id(12), helpstring("property CapPowerReporting")]

HRESULT CapPowerReporting( [out, retval] long* pCapPowerReporting ); No

[propget, id(20), helpstring("property PowerNotify")]

HRESULT PowerNotify( [out, retval] long* pPowerNotify ); No

[propput, id(20), helpstring("property PowerNotify")]

HRESULT PowerNotify( [in] long PowerNotify ); No

[propget, id(21), helpstring("property PowerState")]

HRESULT PowerState( [out, retval] long* pPowerState ); No

// Release 1.4

// Release 1.5

[propget, id(143), helpstring("property CapJrnCartridgeSensor")]

HRESULT CapJrnCartridgeSensor( [out, retval] long* pCapJrnCartridgeSensor ); No

[propget, id(144), helpstring("property CapJrnColor")]

HRESULT CapJrnColor( [out, retval] long* pCapJrnColor ); No

[propget, id(145), helpstring("property CapRecCartridgeSensor")]

HRESULT CapRecCartridgeSensor( [out, retval] long* pCapRecCartridgeSensor ); No

[propget, id(146), helpstring("property CapRecColor")]

HRESULT CapRecColor( [out, retval] long* pCapRecColor ); Yes

Page 34: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

28 6.110.95.1.1.022

[propget, id(147), helpstring("property CapRecMarkFeed")]

HRESULT CapRecMarkFeed( [out, retval] long* pCapRecMarkFeed ); No

[propget, id(148), helpstring("property CapSlpBothSidesPrint")]

HRESULT CapSlpBothSidesPrint( [out, retval] VARIANT_BOOL* pCapSlpBothSidesPrint ); No

[propget, id(149), helpstring("property CapSlpCartridgeSensor")]

HRESULT CapSlpCartridgeSensor( [out, retval] long* pCapSlpCartridgeSensor ); No

[propget, id(150), helpstring("property CapSlpColor")]

HRESULT CapSlpColor( [out, retval] long* pCapSlpColor ); No

[propget, id(151), helpstring("property CartridgeNotify")]

HRESULT CartridgeNotify( [out, retval] long* pCartridgeNotify ); No

[propput, id(151), helpstring("property CartridgeNotify")]

HRESULT CartridgeNotify( [in] long CartridgeNotify ); No

[propget, id(152), helpstring("property JrnCartridgeState")]

HRESULT JrnCartridgeState( [out, retval] long* pJrnCartridgeState ); No

[propget, id(153), helpstring("property JrnCurrentCartridge")]

HRESULT JrnCurrentCartridge( [out, retval] long* pJrnCurrentCartridge ); No

[propput, id(153), helpstring("property JrnCurrentCartridge")]

HRESULT JrnCurrentCartridge( [in] long JrnCurrentCartridge ); No

[propget, id(154), helpstring("property RecCartridgeState")]

HRESULT RecCartridgeState( [out, retval] long* pRecCartridgeState ); No

[propget, id(155), helpstring("property RecCurrentCartridge")]

HRESULT RecCurrentCartridge( [out, retval] long* pRecCurrentCartridge ); No

[propput, id(155), helpstring("property RecCurrentCartridge")]

HRESULT RecCurrentCartridge( [in] long RecCurrentCartridge ); No

[propget, id(156), helpstring("property SlpCartridgeState")]

HRESULT SlpCartridgeState( [out, retval] long* pSlpCartridgeState ); No

[propget, id(157), helpstring("property SlpCurrentCartridge")]

HRESULT SlpCurrentCartridge( [out, retval] long* pSlpCurrentCartridge ); No

[propput, id(157), helpstring("property SlpCurrentCartridge")]

HRESULT SlpCurrentCartridge( [in] long SlpCurrentCartridge ); No

[propget, id(158), helpstring("property SlpPrintSide")]

HRESULT SlpPrintSide( [out, retval] long* pSlpPrintSide ); No

Page 35: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 29

[id(175), helpstring("method ChangePrintSide")]

HRESULT ChangePrintSide(

[in] long Side,

[out, retval] long* pRC ); No

[id(176), helpstring("method MarkFeed")]

HRESULT MarkFeed(

[in] long Type,

[out, retval] long* pRC );

No

// Release 1.6

};

//

//========== Previous Interface: 1.7 ==========

interface IOPOSPOSPrinter_1_7 : IOPOSPOSPrinter_1_5

{

// Release 1.7

[propget, id(190), helpstring("property CapMapCharacterSet")]

HRESULT CapMapCharacterSet( [out, retval] VARIANT_BOOL* pCapMapCharacterSet ); Yes

[propget, id(191), helpstring("property MapCharacterSet")]

HRESULT MapCharacterSet( [out, retval] VARIANT_BOOL* pMapCharacterSet ); No

[propput, id(191), helpstring("property MapCharacterSet")]

HRESULT MapCharacterSet( [in] VARIANT_BOOL MapCharacterSet ); No

[propget, id(192), helpstring("property RecBitmapRotationList")]

HRESULT RecBitmapRotationList( [out, retval] BSTR* pRecBitmapRotationList ); Yes

[propget, id(193), helpstring("property SlpBitmapRotationList")]

HRESULT SlpBitmapRotationList( [out, retval] BSTR* pSlpBitmapRotationList ); No

};

//

//========== Previous Interface: 1.8 ==========

//

interface IOPOSPOSPrinter_1_8 : IOPOSPOSPrinter_1_7

{

// Release 1.8

[propget, id(39), helpstring("property CapStatisticsReporting")]

HRESULT CapStatisticsReporting( [out, retval] VARIANT_BOOL* pCapStatisticsReporting ); Yes

Page 36: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

30 6.110.95.1.1.022

[propget, id(40), helpstring("property CapUpdateStatistics")]

HRESULT CapUpdateStatistics( [out, retval] VARIANT_BOOL* pCapUpdateStatistics ); No

[id(41), helpstring("method ResetStatistics")]

HRESULT ResetStatistics(

[in] BSTR StatisticsBuffer,

[out, retval] long* pRC ); No

[id(42), helpstring("method RetrieveStatistics")]

HRESULT RetrieveStatistics(

[in, out] BSTR* pStatisticsBuffer,

[out, retval] long* pRC );

No

[id(43), helpstring("method UpdateStatistics")]

HRESULT UpdateStatistics(

[in] BSTR StatisticsBuffer,

[out, retval] long* pRC );

No

};

//

//========== Previous Interface: 1.9 ==========

//

interface IOPOSPOSPrinter_1_9 : IOPOSPOSPrinter_1_8

{

// Release 1.9

[propget, id(44), helpstring("property CapCompareFirmwareVersion")]

HRESULT CapCompareFirmwareVersion( [out, retval] VARIANT_BOOL* pCapCompareFirmwareVersion ); Yes

[propget, id(45), helpstring("property CapUpdateFirmware")]

HRESULT CapUpdateFirmware( [out, retval] VARIANT_BOOL* pCapUpdateFirmware ); Yes

[id(46), helpstring("method CompareFirmwareVersion")]

HRESULT CompareFirmwareVersion(

[in] BSTR FirmwareFileName,

[out] long* pResult,

[out, retval] long* pRC );

No

[id(47), helpstring("method UpdateFirmware")]

HRESULT UpdateFirmware(

[in] BSTR FirmwareFileName,

[out, retval] long* pRC );

Yes

Page 37: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 31

[propget, id(194), helpstring("property CapConcurrentPageMode")]

HRESULT CapConcurrentPageMode( [out, retval] VARIANT_BOOL* pCapConcurrentPageMode ); No

[propget, id(195), helpstring("property CapRecPageMode")]

HRESULT CapRecPageMode( [out, retval] VARIANT_BOOL* pCapRecPageMode ); Yes

[propget, id(196), helpstring("property CapSlpPageMode")]

HRESULT CapSlpPageMode( [out, retval] VARIANT_BOOL* pCapSlpPageMode ); No

[propget, id(197), helpstring("property PageModeArea")]

HRESULT PageModeArea( [out, retval] BSTR* pPageModeArea ); No

[propget, id(198), helpstring("property PageModeDescriptor")]

HRESULT PageModeDescriptor( [out, retval] long* pPageModeDescriptor ); No

[propget, id(199), helpstring("property PageModeHorizontalPosition")]

HRESULT PageModeHorizontalPosition( [out, retval] long* pPageModeHorizontalPosition ); No

[propput, id(199), helpstring("property PageModeHorizontalPosition")]

HRESULT PageModeHorizontalPosition( [in] long PageModeHorizontalPosition ); No

[propget, id(200), helpstring("property PageModePrintArea")]

HRESULT PageModePrintArea( [out, retval] BSTR* pPageModePrintArea ); No

[propput, id(200), helpstring("property PageModePrintArea")]

HRESULT PageModePrintArea( [in] BSTR PageModePrintArea ); No

[propget, id(201), helpstring("property PageModePrintDirection")]

HRESULT PageModePrintDirection( [out, retval] long* pPageModePrintDirection ); No

[propput, id(201), helpstring("property PageModePrintDirection")]

HRESULT PageModePrintDirection( [in] long PageModePrintDirection ); No

[propget, id(202), helpstring("property PageModeStation")]

HRESULT PageModeStation( [out, retval] long* pPageModeStation ); No

[propput, id(202), helpstring("property PageModeStation")]

HRESULT PageModeStation( [in] long PageModeStation ); No

[propget, id(203), helpstring("property PageModeVerticalPosition")]

HRESULT PageModeVerticalPosition( [out, retval] long* pPageModeVerticalPosition ); Yes

[propput, id(203), helpstring("property PageModeVerticalPosition")]

HRESULT PageModeVerticalPosition( [in] long PageModeVerticalPosition ); Yes

[id(177), helpstring("method ClearPrintArea")]

HRESULT ClearPrintArea(

[out, retval] long* pRC ); Yes

Page 38: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

32 6.110.95.1.1.022

[id(178), helpstring("method PageModePrint")]

HRESULT PageModePrint(

[in] long Control,

[out, retval] long* pRC );

Yes

};

//

//========== Previous Interface: 1.10 ==========

//

interface IOPOSPOSPrinter_1_10 : IOPOSPOSPrinter_1_9

{

// Release 1.10

[id(179), helpstring("method PrintMemoryBitmap")]

HRESULT PrintMemoryBitmap(

[in] long Station,

[in] BSTR Data,

[in] long Type,

[in] long Width,

[in] long Alignment,

[out, retval] long* pRC );

Yes

// Release 1.11

// Release 1.12

}; No

//

//========== Current Interface: 1.13 ==========

//

interface IOPOSPOSPrinter_1_13 : IOPOSPOSPrinter_1_10

{

// Release 1.13

[propget, id(204), helpstring("property CapRecRuledLine")]

HRESULT CapRecRuledLine( [out, retval] long* pCapRecRuledLine ); Yes

[propget, id(205), helpstring("property CapSlpRuledLine")]

HRESULT CapSlpRuledLine( [out, retval] long* pCapSlpRuledLine ); No

Page 39: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 33

[id(180), helpstring("method DrawRuledLine")]

HRESULT DrawRuledLine(

[in] long Station,

[in] BSTR PositionList,

[in] long LineDirection,

[in] long LineWidth,

[in] long LineStyle,

[in] long LineColor,

[out, retval] long* pRC );

No

};

//

//---------- IOPOSPOSPrinter Interface: Invariant Name ----------

//

interface IOPOSPOSPrinter : IOPOSPOSPrinter_1_13

{

};

interface IBizPOSPrinterSO : IDispatch{

//Release 1.0 methods

Interface method / Function of printer service object

Implemented by

Bizerba [id(1), helpstring("method COFreezeEvents")]

HRESULT COFreezeEvents(

[in] VARIANT_BOOL Freeze,

[out,retval] LONG* pRC);

Yes

[id(2), helpstring("method GetPropertyNumber")]

HRESULT GetPropertyNumber(

[in] LONG PropIndex,

[out,retval] LONG* pNumber);

Yes

[id(3), helpstring("method SetPropertyNumber")]

HRESULT SetPropertyNumber(

[in] LONG PropIndex,

[in] LONG Number);

Yes

[id(4), helpstring("method GetPropertyString")]

HRESULT GetPropertyString(

[in] LONG PropIndex,

[out,retval] BSTR* pString);

Yes

Page 40: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

34 6.110.95.1.1.022

[id(5), helpstring("method SetPropertyString")]

HRESULT SetPropertyString(

[in] LONG PropIndex,

[in] BSTR string);

Yes

[id(6), helpstring("method OpenService")]

HRESULT OpenService(

[in] BSTR DeviceClass,

[in] BSTR DeviceName,

[in] IDispatch* pDispatch,

[out,retval] LONG* pRC);

Yes

[id(7), helpstring("method CheckHealth")]

HRESULT CheckHealth(

[in] LONG Level,

[out,retval] LONG* pRC);

Yes

[id(8), helpstring("method ClaimDevice")]

HRESULT ClaimDevice(

[in] LONG timeout,

[out,retval] LONG* pRC);

Yes

[id(9), helpstring("method ClearOutput")]

HRESULT ClearOutput(

[out,retval] LONG* pRC);

Yes

[id(10), helpstring("method CloseService")]

HRESULT CloseService(

[out,retval] LONG* pRC);

Yes

[id(11), helpstring("method DirectIO")]

HRESULT DirectIO(

[in] LONG Command,

[in,out] LONG* pData,

[in,out] BSTR* pString,

[out,retval] LONG* pRC);

Yes

[id(12), helpstring("method ReleaseDevice")]

HRESULT ReleaseDevice(

[out,retval] LONG* pRC);

Yes

[id(13), helpstring("method BeginInsertion")]

HRESULT BeginInsertion(

[in]LONG timeout,

[out,retval] LONG* pRC);

No

[id(14), helpstring("method BeginRemoval")]

HRESULT BeginRemoval(

[in]LONG timeout,

[out,retval] LONG* pRC);

No

Page 41: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 35

[id(15), helpstring("method CutPaper")]

HRESULT CutPaper(

[in]LONG percentage,

[out,retval] LONG* pRC);

No

[id(16), helpstring("method EndInsertion")]

HRESULT EndInsertion(

[out,retval] LONG* pRC);

No

[id(17), helpstring("method EndRemoval")]

HRESULT EndRemoval(

[out,retval] LONG* pRC);

No

[id(18), helpstring("method PrintBarCode")]

HRESULT PrintBarCode(

[in] LONG station,

[in] BSTR data,

[in] LONG symbology,

[in] LONG height,

[in] LONG width,

[in] LONG alignment,

[in] LONG textPosition,

[out,retval] LONG* pRC);

Yes

[id(19), helpstring("method PrintBitmap")]

HRESULT PrintBitmap(

[in] LONG station,

[in] BSTR FileName,

[in] LONG width,

[in] LONG alignment,

[out,retval] LONG* pRC);

Yes

[id(20), helpstring("method PrintImmediate")]

HRESULT PrintImmediate(

[in] LONG station,

[in] BSTR data,

[out,retval] LONG* pRC);

No

[id(21), helpstring("method PrintNormal")]

HRESULT PrintNormal(

[in] LONG station,

[in] BSTR data,

[out,retval] LONG* pRC);

Yes

[id(22), helpstring("method PrintTwoNormal")]

HRESULT PrintTwoNormal(

[in] LONG station,

[in] BSTR data1,

[in] BSTR data2,

No

Page 42: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

36 6.110.95.1.1.022

[out,retval] LONG* pRC);

[id(23), helpstring("method RotatePrint")]

HRESULT RotatePrint(

[in] LONG station,

[in] LONG rotation,

[out,retval] LONG* pRC);

No

[id(24), helpstring("method SetBitmap")]

HRESULT SetBitmap(

[in] LONG bitmapNumber,

[in] LONG station,

[in] BSTR FileName,

[in] LONG width,

[in] LONG alignment,

[out,retval] LONG* pRC);

Yes

[id(25), helpstring("method SetLogo")]

HRESULT SetLogo(

[in] LONG location,

[in] BSTR data,

[out,retval] LONG* pRC);

Yes

// Release 1.1 methods

[id(26), helpstring("method TransactionPrint")]

HRESULT TransactionPrint(

[in]LONG station,

[in] LONG control,

[out,retval] LONG* pRC);

Yes

[id(27), helpstring("method ValidateData")]

HRESULT ValidateData(

[in]LONG station,

[in] BSTR data,

[out,retval] LONG* pRC);

Yes

// Release 1.2 methods

// Release 1.3 methods

// Release 1.4 methods

// Release 1.5 methods

[id(28), helpstring("method ChangePrintSide")]

HRESULT ChangePrintSide(

[in] LONG side,

[out,retval] LONG* pRC);

No

Page 43: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 37

[id(29), helpstring("method MarkFeed")]

HRESULT MarkFeed(

[in]LONG type,

[out,retval] LONG* pRC);

No

// Release 1.6 methods

// Release 1.7 methods

// Release 1.8 methods

[id(30), helpstring("method ResetStatistics")]

HRESULT ResetStatistics(

[in]BSTR StatisticsBuffer,

[out,retval] LONG* pRC);

No

[id(31), helpstring("method RetrieveStatistics")]

HRESULT RetrieveStatistics(

[in,out] BSTR* pStatisticsBuffer,

[out,retval] LONG* pRC);

No

[id(32), helpstring("method UpdateStatistics")]

HRESULT UpdateStatistics(

[in] BSTR StatisticsBuffer,

[out,retval] LONG* pRC);

No

// Release 1.9 methods

[id(33), helpstring("method CompareFirmwareVersion")]

HRESULT CompareFirmwareVersion(

[in] BSTR FirmwareFileName,

[out] LONG* pResult,

[out,retval] LONG* pRC);

No

[id(34), helpstring("method UpdateFirmware")]

HRESULT UpdateFirmware(

[in] BSTR FirmwareFileName,

[out,retval] LONG* pRC);

Yes

[id(35), helpstring("method ClearPrintArea")]

HRESULT ClearPrintArea(

[out,retval] LONG* pRC);

Yes

[id(36), helpstring("method PageModePrint")]

HRESULT PageModePrint(

[in] LONG control,

[out, retval] LONG* pRC);

Yes

// Release 1.10 methods

[id(37), helpstring("method PrintMemoryBitmap")]

HRESULT PrintMemoryBitmap(

[in] LONG station,

Yes

Page 44: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

38 6.110.95.1.1.022

[in] BSTR data,

[in] LONG type,

[in] LONG width,

[in] LONG alignment,

[out,retval] LONG* pRC);

// Release 1.11 methods

// Release 1.12 methods

// Release 1.13 methods

[id(38), helpstring("method DrawRuledLine")]

HRESULT DrawRuledLine(

[in] LONG station,

[in] BSTR PositionList,

[in] LONG LineDirection,

[in] LONG LineWidth,

[in] LONG LineStyle,

[in] LONG LineColor,

[out,retval] LONG* pRC);

No

};

Page 45: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 39

4.2.2 Interface for JPOS Interface method / Function UPOS interface „Printer control and configuration“

Parameters Description

public long directIO(long id, long[] data,

Object[] datastring)

In ID

In/Out pData: Intvalues

In/Out pStringData: String Data

DirectIO; ID’s, Parameter see

chapter.:4.3.1

Interface method / Function UPOS Interface „Rendering“

Parameters Description

public long pageModePrint( long control) In:

control:

PTR_PM_PAGE_MODE: enter page mode

Return value:

OPOS_E_ILLEGAL: invalid control

value

Loads a label layout and switches

printer in label mode

PageModePrint(PTR_PM_PAGE_MODE)

public long pageModePrint( long control) In:

control:

PTR_PM_NORMAL: prints the current

layout and leaves page mode

Return value:

OPOS_E_ILLEGAL: invalid control

value

Quits the label mode, i.e.

switches to line printing

(ticket) mode after printing the

current label.

PageModePrint(PTR_PM_NORMAL)

E_ILLEGAL, E_BUSY

public long pageModePrint( long control) In:

control:

PTR_PM_PRINT_SAVE: print the

current layout and dooes not exit

page (label) mode

Return value:

OPOS_E_ILLEGAL: invalid control

value

Transmits the currently rendered

label to printer.

The layout remains unchanged

after printing.

PageModePrint(PTR_PM_PRINT_SAVE)

E_ILLEGAL, E_BUSY

public long pageModePrint( long control) In:

control:

PTR_PM_CANCEL: exit page mode

without printing the current

Deletes all fields of current

label layout.

PageModePrint(PTR_PM_CANCEL)

E_ILLEGAL, E_BUSY

Page 46: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

40 6.110.95.1.1.022

layout.

Return value:

OPOS_E_ILLEGAL: invalid control

value

Check remarks of

UPOSlibPageModePrint

public long PrintNormal(String printstr,

long[] exterr)

Check remarks of UPOSlibPrintNormal Check remarks of

UPOSlibPrintNormal

public long releaseDevice() Check remarks of

UPOSlibReleaseDevice

Check remarks of

UPOSlibReleaseDevice

public long open(String name) Check remarks of UPOSlibOpen Check remarks of UPOSlibOpen

public long Close() Check remarks of UPOSlibClose Check remarks of UPOSlibClose

public long directIO(long id, long[] data,

Object[] datastring)

Check remarks of UPOSlibDirectIO Check remarks of UPOSlibDirectIO

public long compareFirmwareVersion(String

path, byte[] result)

Check remarks of

UPOSlibCompareFirmwareVersion

Check remarks of

UPOSlibCompareFirmwareVersion

public long claim(long timeoutInMs) Check remarks of UPOSlibClaim Check remarks of UPOSlibClaim

public long checkHealth(long level, boolean[]

result) Check remarks of UPOSlibCheckHealth Check remarks of

UPOSlibCheckHealth

public long setBitmap( long id, String path,

long width, long align) Check remarks of UPOSlibSetBitmap Check remarks of UPOSlibSetBitmap

Public void setLogo(int location, String

data)

Check remarks of UPOSSetLogo Check remarks of UPOSSetLogo

public boolean validateEscString(String

printstr) Check remarks of

UPOSlibValidateEscString

Check remarks of

UPOSlibValidateEscString

public long printBarcode(String codestr, long

symbology, long height, long width, long

alignment, long textpos, long[] exterr)

Check remarks of

UPOSlibPrintBarcode

Check remarks of

UPOSlibPrintBarcode

public long printBitmap(String path, long

width, long alignment)

Check remarks of UPOSlibPrintBitmap Check remarks of

UPOSlibPrintBitmap

public long getFontTypefaceList( String[]

fonts)

See UPOSlibGetFontList See UPOSlibGetFontList

public long getRecEmpty(boolean[] paperout) See UPOSlibIsOutOfPaper See UPOSlibIsOutOfPaper

...

Page 47: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 41

4.2.3 Interface for UPOSlib Remark:

After a ticket printout, the layout must be re-loaded again Interface method / function UPOS interface “Printer control and configuration”

Parameters Description

TUPOSErr UPOSlibInit(); Return value:

OPOS_SUCCESS

OPOSERR

Initializes the lib

TUPOSErr UPOSlibExit(); OPOS_SUCCESS

OPOSERR Deinitializes the lib

TUPOSErr UPOSlibUpdateFirmware(const

TUPOSInstanceHdl& insthdl, const CHyFilePath&

file);

In:

file : Absolut path to new firmware insthdl: hdl, returned from

UPOSlibOpen

Return value:

OPOS_E_FAILURE: something bad

happened, please contact your

distributor OPOS_SUCCESS: well done

OPOS_E_ILLEGAL: you passed a

relative path

OPOS_E_NOEXIST: (one) firmware file

not found.

The printers must be open!

Before you try a firmware update,

you should check the versions

with CompareFirmwareVersion.

TUPOSErr UPOSlibGetRecEmpty(const

TUPOSInstanceHdl& insthdl, THydraBool&

paperout, THydraBool& nolabelfound);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

paperout:

HYDRA_TRUE, if no paper

otherwise HYDRA_FALSE

nolabelfound:

HYDRA_TRUE, if no label was

found

otherwise HYDRA_FALSE

Return value:

OPOS_SUCCESS

see UPOSlibIsPaperPresent

Page 48: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

42 6.110.95.1.1.022

OPOS_E_NOTCLAIMED

OPOS_E_ILLEGAL: printer not

opened TUPOSErr UPOSlibGetFontTypefaceList(const

TUPOSInstanceHdl& insthdl,CHyString& fonts);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

Fonts:

String with font name, CSV Return value:

OPOS_SUCCESS

Availabe list of fonts, separated

through a comma

The font IDs start with 1.

FontID 0 means default font, i.e.

with FontID 1. (if 0!= then -1)

FontTypefaceList Property

TUPOSErr UPOSlibPrintBitmap(const

TUPOSInstanceHdl& insthdl, const CHyFilePath&

path,const THydraUInt32& width, const

THydraUInt32& alignment);

In:

insthdl: hdl returned from

UPOSlibOpen

path:

Absolute path on bitmap

width:

Print width in pixel

alignment:

PTR_BM_LEFT

PTR_BM_CENTER

PTR_BM_RIGHT

Return value:

OPOS_E_BUSY

OPOS_E_ILLEGAL invalid width

or alignment

OPOS_E_NOEXIST: file notfound

Only for ticket print:

Print outs Bitmap if an partial

text line has been sent e.g. via

printnormal an implicit line feed

is added and the line is printed

before the bitmap.

Text data sent after printbitmap

begins on the following line

after the bitmap (p1075)

(station for selecting printer is

always PTR_S_RECEIPT)

TUPOSErr UPOSlibPrintBarcode(const

THydraChr8* str, const THydraUInt32 len, const

THydraUInt32 symbology, const THydraUInt32

height, const THydraUInt32 width, const

THydraUInt32 alignment, const THydraUInt32

textpos, TUPOSErr& exterr);

In:

insthdl: hdl returned from

UPOSlibOpen

str: string to bar encode

len: length of string in bytes, if

you pass 0, the string must be 0

terminated!:

symbology:

PTR_BCS_EAN13

PTR_BCS_YESN13

PTR_BCS_EAN8

PTR_BCS_YESN8

PTR_BCS_EAN128

PTR_BCS_GS1DATABAR

Only for ticket printing:

The barcode is printed directly.

(station for selecting printer is

alyways PTR_S_RECEIPT)

Page 49: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 43

PTR_BCS_GS1DATABAR_S

PTR_BCS_GS1DATABAR_E

PTR_BCS_GS1DATABAR_E_S

PTR_BCS_Code39

PTR_BCS_Code128

PTR_BCS_ITF

height:

width:

alignment:

PTR_BC_LEFT

PTR_BC_CENTER

PTR_BC_RIGHT

textpos:

PTR_BC_TEXT_NONE

PTR_BC_TEXT_ABOVE: not

supported

PTR_BC_TEXT_BELOW

Out:

exterr:

OPOS_EPTR_REC_EMPTY: out of

paper

Return value:

OPOS_E_BUSY

OPOS_E_ILLEGAL

OPOS_E_EXTENDED THydraBool UPOSlibValidateEscString(const

TUPOSInstanceHdl& insthdl, const THydraChr8*

str, const THydraUInt32 len);

In:

insthdl: hdl returned from

UPOSlibOpen

str: string to check

len: length of string in bytes, if

you pass 0, the string must be 0

terminated!

Return value:

HYDRA_TRUE: OK

HYDRA_FALSE: NOK

Check string for valid character

sequences.(ValidateData)

TUPOSErr UPOSSetLogo(const TUPOSInstanceHdl&

insthdl, const THydraInt32 location, const THydraChr8* str, const THydraUInt32 len);

In:

insthdl: hdl returned from

UPOSlibOpen

location: PTR_L_TOP

PTR_L_BOTTOM

string:

data string to save

SetLogo - Save a data string as

the top or bottom logo

A character sequence, which might

reference a bitmap or a barcode,

is assigned to an id. This id can

be used in PrintNormal to

reference the character sequence.

Page 50: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

44 6.110.95.1.1.022

may consist of printable

chars, esc-sequences (except

logos), carriage returns (13) and

linefeeds (10) and barcodes

(including \000)

len: length of data, if len==0

string must be 0 terminated.

Return value:

OPOS_E_ILLEGAL

OPOS_SUCCESS

OPOS_E_CLOSED

OPOS_E_NOTCLAIMED

OPOS_E_FAILURE TUPOSErr UPOSlibPrintNormal(const THydraChr8*

str, const THydraUInt32 len, TUPOSErr&

exterr);

In:

insthdl: hdl returned from

UPOSlibOpen

str: String containing payload.

This string can contain

Bizerba-Escape-sequences when

Bizerba Extended-Mode is

active.

len: Length of data transmitted

into str. If 0 is

transmitted, the length is

determined with the final 0. remark: embedded 0 are allowed

inside a barcode escape

sequence an may be coded as

\0 or c080 (utf8) byte

sequence. Count this as 1

byte in the barcode ESC

sequence *#R

Siehe 4.3.6 ff.

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED: not opened

OPOS_E_NOTCLAIMED: not

claimed

OPOS_E_ILLEGAL: argument

error

OPOS_E_BUSY

OPOS_E_FAILURE

OPOS_E_EXTENDED

Argument exterr:

Universial printing function

Italic is not supported

Ticket printout:

the text is printed directly.

Label printout:

The text is rendered in the

referenced field

Only with label print out,

i.e. after loaded layout +

start a fieldID must be

transmitted!

When transmitting a barcode

or an image, ESC sequences

for printer control are not

permissible (paper feed)!

(CharacterSet Property is always

PTR_CS_UNICODE)

(station on selection of printer

is always PTR_S_RECEIPT)

Page 51: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 45

OPOS_EPTR_REC_EMPTY: out of

paper

UPOS_BIZ_EPTR_NOLABELFOUND:

paper is inserted, but next label

was not found (only with label

paper)

Interface method / function UPOS interface “UPOS General”

Parameters Description

TUPOSErr UPOSlibCheckHealth (const

TUPOSInstanceHdl& insthdl, const THydraUInt32

level, THydraBool& result);

In:

insthdl: hdl returned from

UPOSlibOpen

level: OPOS_CH_INTERNAL: do not

print

OPOS_CH_EXTERNAL: do print

Out:

result: HYDRA_TRUE

HYDRA_FALSE

Return value:

OPOS_E_ILLEGAL: requested level not supported

OPOS_SUCCESS

OPOS_E_BUSY: output in

progress

Starts printer test, the printer

must be opened before by using

the Open-command

TUPOSErr UPOSlibClaim(const TUPOSInstanceHdl&

insthdl, const THydraUInt32 timeout_in_ms);

In:

insthdl: hdl returned from

UPOSlibOpen

timeout_in_ms:

ms to try (incl. 0), OPOS_FOREVER(-1) Return value:

OPOS_E_ILLEGAL: invalid

timeout value or invalid

printer name

OPOS_SUCCESS: claimed

property is true OPOS_E_EXISTS: already

claimed

OPOS_E_TIMEOUT OPOS_E_NOSERVICE: cannot open

Exclusive access to the device

Page 52: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

46 6.110.95.1.1.022

TUPOSErr UPOSlibClose(TUPOSInstanceHdl&

insthdl);

In:

insthdl: hdl returned from

UPOSlibOpen

Return value:

OPOS_SUCCESS

Release device and its resources

Claimed property => false

Device enabled property=> false

TUPOSErr UPOSlibCompareFirmwareVersion(const TUPOSInstanceHdl& insthdl, const CHyFilePath&

path,THydraUInt8& result);

In:

insthdl: hdl returned from

UPOSlibOpen

path: Path to file with version

to compare to the current

version Out:

Result:

OPOS_CFV_FIRMWARE_OLDER

OPOS_CFV_FIRMWARE_SAME

OPOS_CFV_FIRMWARE_NEWER

OPOS_CFV_FIRMWARE_DIFFERENT

OPOS_CFV_FIRMWARE_UNKNOWN

Return value:

OPOS_SUCCESS OPOS_E_ILLEGAL

OPOS_E_NOEXIST

OPOS_E_EXTENDED

CompareFirmwareVersion

TUPOSErr UPOSlibDirectIO(const TUPOSInstanceHdl& insthdl, const

THydraUInt32& id, THydraUInt32& data,

CHyString& string);

In:

insthdl: hdl returned from

UPOSlibOpen

id: command id

data: string

Out:

data:

string:

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_ILLEGAL: printer not

opened

(see chapter.:4.3.1.1)

TUPOSErr UPOSlibOpen(const CHyString& name ,

TUPOSInstanceHdl& insthdl);

In:

name: device to open

Out:

insthdl: Handle for referencing the

Open device

Result Code Property

Page 53: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 47

instance just opened. Only valid

with OPOS_SUCCESS

Return value:

OPOS_SUCCESS

OPOS_E_EXISTS: already opened

OPOS_E_NOEXIST: name not

found

OPOS_E_NOSERVICE: cannot open

TUPOSErr UPOSlibReleaseDevice(); In:

insthdl: hdl returned from

UPOSlibOpen

Return value:

OPOS_SUCCESS,

OPOS_E_NOTCLAIMED: not

claimed

Release claimed device

Device Enabled Property

TUPOSErr UPOSlibPageModePrint(const

TUPOSInstanceHdl& insthdl, const THydraInt32

control)

In:

insthdl: hdl returned from

UPOSlibOpen

control:

PTR_PM_PAGE_MODE: enter page mode

PTR_PM_NORMAL: print the current

layout and leave page mode.

PTR_PM_CANCEL: clear and leave page

mode label without printing.

PTR_PM_PRINT_SAVE: print label and

do not exit page (label) mode.

Return value:

OPOS_E_ILLEGAL: invalid control

value

OPOS_E_FAILURE: Rendering failed

OPOS_EPTR_REC_EMPTY: out of paper

UPOS_BIZ_EPTR_NOLABELFOUND: paper

is inserted, but next label was not

found (only with label paper)

TUPOSErr UPOSlibSetBitmap (const

TUPOSInstanceHdl& insthdl, const THydraUInt32&

id, const CHyFilePath& path,const THydraInt32&

width, const THydraInt32& align)

In:

id: the slot id to which the bitmap

will reference [1..20]

width: currently not implemented

path: absolute path to bitmap

width: must be PTR_BM_ASIS

insthdl: hdl das von UPOSlibOpen

Page 54: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

48 6.110.95.1.1.022

zurückgegeben wurde

align:

PTR_BM_RIGHT

PTR_BM_CENTER

PTR_BM_LEFT

0 (use default)

Return value:

OPOS_SUCCESS OPOS_E_NOEXIST OPOS_E_ILLEGAL

TUPOSErr UPOSlibClearPrintArea (const

TUPOSInstanceHdl& insthdl);

In:

insthdl: hdl returned from

UPOSlibOpen

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED

Ticket mode: clear printer and

line buffer, if transaction mode

active

Label mode: reset label

TUPOSErr UPOSlibGetRecLinesToPaperCut (const

TUPOSInstanceHdl& insthdl, THydraUInt32&

lines, CHyString& errorText);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

lines:

lines from dot-line to papercut

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED

TUPOSErr UPOSlibGetDeviceEnabled(const

TUPOSInstanceHdl& insthdl, THydraBool&

enabled);

In:

insthdl hdl returned from

UPOSlibOpen

Out:

enabled:

TRUE when enabled

FALSE when disabled

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED

TUPOSErr UPOSlibSetDeviceEnabled(const

TUPOSInstanceHdl& insthdl, const THydraBool

enabled);

In:

insthdl: hdl returned from

UPOSlibOpen

Page 55: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 49

enabled:

TRUE to enable

FALSE to disable

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED

TUPOSErr UPOSlibGetState(const

TUPOSInstanceHdl& insthdl, THydraUInt32&

state);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

state: OPOS_S_BUSY

OPOS_S_IDLE Return value:

OPOS_SUCCESS

OPOS_S_CLOSED

TUPOSErr UPOSlibGetCheckHealthText(const

TUPOSInstanceHdl& insthdl, CHyString& text);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

text: health text

Return value:

OPOS_SUCCESS

TUPOSErr UPOSlibTransactionPrint(const

TUPOSInstanceHdl& insthdl, const THydraUInt32

control);

In:

insthdl: hdl returned from

UPOSlibOpen

control:

PTR_TP_TRANSACTION: start

transaction

PTR_TP_NORMAL: stop transaction

Return value:

OPOS_SUCCESS

OPOS_EPTR_REC_EMPTY: out of paper

UPOS_BIZ_EPTR_NOLABELFOUND: paper

is inserted, but next label was not

found (only with label paper)

Page 56: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

50 6.110.95.1.1.022

TUPOSErr UPOSlibGetRecLineChars(const

TUPOSInstanceHdl& insthdl, THydraUInt32&

charsperline);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

charsperline:

number of chars per line which can

be printed with the current font

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED

This function depends on the

current active font (selected by

esc-sequences).

When a proportional font is

selected charsperline is meant as

an average value.

For a monospaced font the value

is accurate.

TUPOSErr UPOSlibSetRecLineChars(const

TUPOSInstanceHdl& insthdl, const THydraUInt32

charsperline);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

charsperline:

select a font with a least number

of chars per line which can be

printed with the current font

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED

This function depends on the

current active font (selected by

esc-sequences).

If a monospaced font is active

the selection is done by

searching through the monospaced

fonts, is a proportional font is

active another proportional font

is selected.

TUPOSErr UPOSlibGetRecLineCharsList(const

TUPOSInstanceHdl& insthdl, CHyString& text);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

text:

list of available values for

UPOSlibSetRecLineChars /

UPOSlibGetRecLineChars

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED

TUPOSErr UPOSlibGetClaimed(const

TUPOSInstanceHdl& insthdl, THydraBool&

claimed);

In:

insthdl: hdl returned from

UPOSlibOpen

Out:

Page 57: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 51

claimed: (available when opened)

TRUE when claimed

FALSE when not claimed

Return value:

OPOS_SUCCESS

OPOS_E_CLOSED: open before calling

Internal UPOSlib API CHyString UPOSlibGetPrinterFirmwareVersion(); In:

insthdl: hdl returned from

UPOSlibOpen

Out:

Return value:

The version string

FirmwareVersion

DirectIO; id 8 (see

chapter:4.3.1)

CHyString UPOSlibGetLibraryVersion(const

CHyString& libname);

In:

libname: name of lib to get the

version from

Out:

Return value:

The version string or “” if

the lib is not found

LibraryVersion

DirectIO; id 9 (see

chapter:4.3.1)

CHyString UPOSlibGetAllLibrariesVersions(); Out:

Return value:

The version strings of all

libraries

Example:

uposlib:01.0000,bldlib:01.0000

LibrariesVersion

DirectIO; id 10 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetStrobeTime (const

THydraUInt8 time_in_percent);

In:

value:

strobe time in percent

Out:

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting strobe time of the

printer head in percent

DirectIO; id 11 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetStrobeTime (THydraUInt8&

time_in_percent);

Out:

value:

strobe time in percent

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

Inquiring the strobe time

DirectIO; id 12 (see

chapter:4.3.1

Page 58: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

52 6.110.95.1.1.022

OPOS_E_CLOSED: printer not

opened

TUPOSErr UPOSlibSetPrinterSpeed (const

THydraUInt16 speed_in_mmps);

In:

value:

printer speed

Out:

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting printer spped (constant

for 44,55,66,88,102,… mm/s)

DirectIO; id 13 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetPrinterSpeed (THydraUInt16&

speed_in_mmps);

Out:

value:

printer speed

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Inquiring printer speed (

constant for 44,55,66,88,102,…

mm/s) abfragen

DirectIO; id 14 (see

chapter:4.3.1)

TUPOSErr

UPOSlibIsPrinterHeadOverheating(THydraBool&

hot);

Out:

hot:

HYDRA_TRUE if overheaten

otherwise HYDRA_FALSE

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Printerhead overheaten?

DirectIO; id 15 (see

chapter:4.3.1)

TUPOSErr UPOSlibLineFeed(const THydraUInt16

line_in_pixels);

In:

line_in_pixels: No. of pixel lines Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

OPOSERREXT: too hot

Feeds in paper by number of

lines.

DirectIO; id 16 (see

chapter:4.3.1)

TUPOSErr UPOSlibLineFeedReverse(const

THydraUInt16 line_in_pixels);

In:

line_in_pixels: No. of pixel lines Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

Reverse paper by number of lines.

DirectIO; id 17 (see

chapter:4.3.1)

PrintNormal(ESC |[#]rF)

Page 59: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 53

OPOS_E_CLOSED: printer not

opened

TUPOSErr

UPOSlibGetPaperSensorValue(THydraUInt8& val);

Out:

val: 0-255

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Inquiring current value of light

barrier

Ticket printout with regard to

hardware: Light barrier value

inverted!DirectIO; id 18 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetPrinterMode(THydraUInt8&

mode);

Out:

mode: current mode

Mode 1=Ticket paper

Mode 2=Label paper

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Label/ticket mode for printer lib

inquiry

DirectIO; id 20 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetPrinterMode (const

THydraUInt8 mode);

In:

mode:

Mode 1=Ticket paper

Mode 2=Label paper

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting label/ticket mode for

Printerlib

DirectIO; id 19 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetLabelsMaxGap (const

THydraUInt16 gap);

In:

line_in_pixels: No. of pixel lines

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Only applicable in label mode.

Setting max. label distance that

is searched for the start of the

next label( on backing paper,

semi-automatic)

DirectIO; id 21 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetLabelsGap (THydraUInt16&

gap);

Out:

line_in_pixels: No. of pixel lines

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

Only applicable in label mode.

Setting max. label distance that

is searched (on backing paper,

semi-automatic)

DirectIO; id 22 (see

chapter:4.3.1)

Page 60: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

54 6.110.95.1.1.022

opened

TUPOSErr UPOSlibGetReversingDistance

(THydraUInt16& gap);

In:

line_in_pixels: No. of pixel lines Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Only applicable in label mode.

Inquiring reverse length: In

label printing, after each label

there is a movement forward by

the length of the front edge.

DirectIO; id 24 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetReversingDistance (const

THydraUInt16 gap); Out:

line_in_pixels: No. of pixel lines

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Only applicable in label mode.

Setting reverse length: In label

printing, after each label there

is a movement forward by the

length of the front edge. Before

printing it is retracted by the

reverse length.

DirectIO; id 23 (see

chapter:4.3.1)

TUPOSErr UPOSlibLabelFormFeed (); Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Only applicable in label mode.

Formfeed label (positioning to

next label)

DirectIO; id 25 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetLabelLength (THydraUInt16&

length);

Out:

length: No. of pixel lines

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Inquiring ticket length

DirectIO; id 27 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetLabelLength(const

THydraUInt16 length);

In:

length: No. of pixel lines

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting ticket length

DirectIO; id 26 (see

chapter:4.3.1)

TUPOSErr Out: Inquiring light barrier value

Page 61: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 55

UPOSlibGetPaperGapSensorValue(THydraUInt8&

value);

value: 0-255

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

between labels

DirectIO; id 29 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetPaperGapSensorValue(const

THydraUInt8 value);

In:

value: 0-255

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting default value for light

barrier value between labels

DirectIO; id 28 (see

chapter:4.3.1)

TUPOSErr UPOSlibSetOffsetLabelPositioning

(const TUPOSInstanceHdl& insthdl, const

THydraInt16 offset, CHyString& errorText)

In:

offset: offset to positioning label

Return value:

OPOS_SUCCESS

OPOS_E_FAILURE

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting correction factor to

positioning label

DirectIO; id 33 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetOffsetLabelPositioning

(const TUPOSInstanceHdl& insthdl, const

THydraInt16 &offset, CHyString& errorText)

Out:

offset: offset to positioning label

Return value:

OPOS_SUCCESS

OPOS_E_FAILURE

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Inquiring correction factor to

positioning label

DirectIO; id 34 (see

chapter:4.3.1)

TUPOSErr UPOSlibTrain (const

TUPOSInstanceHdl& insthdl, CHyString&

errorText) Return value:

OPOS_SUCCESS

OPOS_E_FAILURE

Ticket mode: If the application

call this function paper must be

removed. Threshold for paper end

will be detect.

Label mode: Label is positioning

DirectIO; id 1 (see

chapter:4.3.1)

Page 62: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

56 6.110.95.1.1.022

Interface method / Function UPOS interface „Rendering“

Parameters Description

TUPOSErr UPOSlibLoadLayout (const

CHyFilePath& file);

In:

file: absolut path to a layout file

Return value:

OPOS_SUCCESS

OPOS_E_ILLEGAL: no absolute

path or not a file

OPOS_E_NOEXIST: file does not

exist

OPOS_E_FAILURE: failed to

load file

Load the BLD-XML-Layout.

DirectIO; id 4 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetUsedFieldIDsList

(CHyString& ids);

Out:

ids: List of field Ids contained in

the layout, separated by comma

e.g. 1,6,10

Return value:

OPOS_SUCCESS

OPOS_E_NOEXIST: no layout

loaded/available

Returns a list of all field ID

strings contained in the layout

DirectIO; id 5 (see

chapter:4.3.1)

TUPOSErr

UPOSlibUseBizerbaTextExtensions(THydraBool

on);

In:

on:

HYDRA_TRUE: Extensions off

HYDRA_FALSE: Extensions on

Return value:

OPOS_SUCCESS

Switches on or off the Bizerba

extensions.

If this switch is not set, no

Bizerba Escape sequences are

interpreted, i.e.^ is printed as

^.

If this switch is set, ^ is

interpreted as Bizerba Escape

character with the defined

sequences.

Label printout only if this

switch is set!

In case of

overlapping/cascade/mixing of

UPOS and Bizerba sequences the

response is not defined and

subject to change.DirectIO; id 6

(see chapter:4.3.1)

THydraBool

UPOSlibGetBizerbaTextExtensionsActive();

Return value:

HYDRA_TRUE: Extensions off

HYDRA_FALSE: Extensions on

Inquiring Bizerba extensions

DirectIO; id 7 (see

chapter:4.3.1)

Page 63: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 57

TUPOSErr UPOSlibExistsInFont (THydraUInt32

ucs2char, const THydraUInt8& fontid,

THydraBool& exists);

In:

ucs2char:

4 byte unicode character

Fontid:

Number of the font

Out:

Exists:

HYDRA_TRUE: exist

HYDRA_FALSE: does not exist

Return value:

OPOS_E_EXISTS

OPOS_E_NOEXIST

Checks if the font contains the

Unicode character

DirectIO; id 30 (see

chapter:4.3.1)

TUPOSErr UPOSlibIsPaperPresent (THydraBool&

PaperPresent);

Out:

PaperPresent:

HYDRA_TRUE: exist

HYDRA_FALSE: does not exist

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

In ticket mode: End of paper

In label mode: Label end, i.e.

label no longer found after gap

or gap between labels too big.

TUPOSErr UPOSlibStartLabel(); Return value:

OPOS_SUCCESS

OPOS_E_ILLEGAL: no absolute

path or not a file

OPOS_E_NOEXIST: file does not

exist

OPOS_E_FAILURE: failed to

load file

Loads a label layout and switches

printer into label

modePageModePrint(PTR_PM_PAGE_MOD

E)

TUPOSErr UPOSlibEndLabel(); Return value:

OPOS_SUCCESS

OPOS_E_CLOSED: printer not

opened

Transmits the currently rendered

label to printer and quits the

label mode, i.e. it switches to

line print (ticket) mode

PageModePrint(PTR_PM_NORMAL)

E_ILLEGAL, E_BUSY

TUPOSErr UPOSlibPrintLabel(); Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

OPOS_E_NOEXIST: no layout

Transmits the currently rendered

label to printer.

The layout remains unchanged

after printing.

PageModePrint(PTR_PM_PRINT_SAVE)

E_ILLEGAL, E_BUSY

Page 64: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

58 6.110.95.1.1.022

loaded / available TUPOSErr UPOSlibClearLabel(); Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

OPOS_E_NOEXIST: no layout

loaded / available

ClearPrintArea

All fields of the current layout

are reset to their initial

values. If you want to clear the

presets stored in the layout you

have to assign “empty values”,

e.g. “”.

TUPOSErr UPOSlibTest(const TUPOSInstanceHdl&

insthdl);

In:

insthdl: hdl returned from

UPOSlibOpen

Return value:

OPOS_SUCCESS

OPOS_E_NOTCLAIMED

TUPOSErr UPOSlibSetLabelOffset (const

TUPOSInstanceHdl& insthdl, const THydraInt16

offset, CHyString& errorText)

In:

offset: offset for decorative

labels

Return value:

OPOS_SUCCESS

OPOS_E_FAILURE

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Setting offset for decorative

labels

DirectIO; id 41 (see

chapter:4.3.1)

TUPOSErr UPOSlibGetLabelOffset (const

TUPOSInstanceHdl& insthdl, const THydraInt16

&offset, CHyString& errorText)

Out:

offset: offset for decorative

labels

Return value:

OPOS_SUCCESS

OPOS_E_FAILURE

OPOS_E_NOTCLAIMED

OPOS_E_CLOSED: printer not

opened

Inquiring offset for decorative

labels

DirectIO; id 42 (see

chapter:4.3.1)

Page 65: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 59

Page 66: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2
Page 67: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 61

4.3 Specifications

4.3.1 DirectIO constants Errorhandling: Return in out-String, ERROR:[#] TXT e.g.

RETURN:[999] invalid Argument RETURN:[0] OK Data: e.g. in, out, inout, possible values Obj: in, out, inout, data type, e.g. String or int32, possible values

Meaning cmd Data Obj

Learning mode 1

Out: errorvalue

Out: RETURN:[#] TXT

GetMaxDotsPerLine 3

Out: Current Value (0-0xFFFF)

Out: RETURN:[#] TXT

LoadLayout

4

Out: errorvalue

In: Absolute path to the layout file Out: RETURN:[#] TXT

GetFields

5

Out: errorvalue

Out: List of ids of the loaded layout. The ids are comma separated The string may contain more or other (internal) ids than mentioned in the list in 4.3.5. Or RETURN:[#] TXT

SetUseBizerbaTextExtensions 6

In: 1 => Enable Extensions 2 => Disable Extensions

Out: RETURN:[#] TXT

GetUseBizerbaTextExtensions 7

Out: 1: Extensions are enabled 2: Extensions are disabled

Out: RETURN:[#] TXT

GetPrinterFirmwareVersion

8

Out: errorvalue

Out: Versionstring Or RETURN:[#] TXT

GetLibraryVersion

9

unused In: libname as String Out: Versionstring of lib Or RETURN:[ OPOS_E_NOEXIST] TXT

Page 68: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

62 6.110.95.1.1.022

GetAllLibrariesVersions

10

unused Out: List of all used libs with versions as , separated Or RETURN:[#] TXT

SetStrobeTime 11

In: Value to set: 0-100

Out: RETURN:[#] TXT

GetStrobeTime 12

Out: Current value 0-100

Out: RETURN:[#] TXT

SetPrinterSpeed

13

In: Value to set: 1=44mm/s 2=55mm/s 3=66mm/s 4=88mm/s 5=102mm/s Remark: The availability of these values depends on hardware capabilities.

Out: RETURN:[#] TXT

GetPrinterSpeed

14

Out: Current value 1=44mm/s 2=55mm/s 3=66mm/s 4=88mm/s 5=102mm/s

Out: RETURN:[#] TXT

GetTemperatureTooHigh

15

Out: 0 => Error 1 => Temperature OK 2 => Temperature NOK

Out: RETURN:[#] TXT

Line Feed (see. 5.1) 16

In: # of lines to feed (0-0xFFFF)

Out: RETURN:[#] TXT

Line Feed Reverse (see. 5.1) 17

In: # of lines to feed (0-0xFFFF)

Out: RETURN:[#] TXT

GetPaperSensorValue 18

Out: Light barrier value 0-255

Out: RETURN:[#] TXT

SetLabelOrTicketMode

Remark: each call sets the papertype to 0! 19

In: 1 => Mode 1 (ticket) 2 => Mode 2 (label)

Out: RETURN:[#] TXT

GetLabelOrTicketMode

20

Out: Current Value 1 => Mode 1 (ticket) 2 => Mode 2 (label)

Out: RETURN:[#] TXT

SetLabelsGap DEPRECATED LEVEL 1 21

In: Value to set (0-0xFFFF)

Out: RETURN:[#] TXT

Page 69: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 63

GetLabelsGap 22

Out: Current Value (0-0xFFFF)

Out: RETURN:[#] TXT

SetReversingDistance (distance in dots) 23

In: Value to set (0-0xFFFF)

Out: RETURN:[#] TXT

GetReversingDistance (distance in dots) 24

Out: Current Value (0-0xFFFF)

Out: RETURN:[#] TXT

LabelFormFeed(see. 5.1) 25

Unused

Out: RETURN:[#] TXT

SetLabelLength DEPRECATED LEVEL 1 26

In: Value to set (0-0xFFFF) (lines)

Out: RETURN:[#] TXT

GetLabelLength 27

Out: Current Value (0-0xFFFF) (lines)

Out: RETURN:[#] TXT

GetLabelsGapPaperSensorValue 29

Out: Current Value (0-255)

Out: RETURN:[#] TXT

UnicodeCharExistsInFont

30

In: unicode char Out: 1 Char exists 2 Char not exists

In: Decimal string of font id Out: RETURN:[#] TXT

LabelSensorValue

31

Out: 1 => Label not removed 2 => Label removed

Out: RETURN:[#] TXT

(internal use only!!!)SetRenderFile

32

Unused

In: FileName Out: RETURN:[#] TXT

SetOffsetLabelPositioning DEPRECATED LEVEL 1 33

In: Value to set (-32768 … 32767)

Out: RETURN:[#] TXT

GetOffsetLabelPositioning

34

Out: Current Value (-32768 … 32767)

Out: RETURN:[#] TXT

Same as id 1 35

Test

36

Unused In: Testpath Out: RETURN:[#] TXT

SetRightToLeft 37

In: 1: Right To Left 2: Left To Right

Out: RETURN:[#] TXT

SetPaperWidth (printable width in dots) 38

In: set width in dots for current paper type

In: string with a value to indicate which

Page 70: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

64 6.110.95.1.1.022

If you know the paperwidth in mm you can calculate the width as follows: Current print bar resolution in dots per mm * paperwidth in mm = paperwith in dots Examples: If the print bar has 8 dots per mm and your paper is 54mm wide can pass 432 dots with this parameter. This is usually the maximum for Bizerba 2” printers. If the print bar has 8 dots per mm and your paper is 72mm wide you get 576. This is currently the maximum for Bizerba 3” printers. For more details please refer to the hardware documentation.

width to set: 0: legacy 1: ticket 2: label 4: linerless 12: linerless-blackmark-bottom 20: linerless-blackmark-top If an empty string is passed the width of the current papertype is set. Out: RETURN:[#] TXT

GetPaperWidth (printable width in dots)

39

Out: width in dots

In: string with a value to indicate which width to get: 0: legacy 1: ticket 2: label 4: linerless 12: linerless-blackmark-bottom 20: linerless-blackmark-top If an empty string is passed the width of the current papertype is get. Out: RETURN:[#] TXT

GetHardwareInfo (internal technical data)

40

Unused Out: Comma separated list of hardware information Or RETURN:[ERROR] TXT

SetLabelOffset 41 In: Out:

Page 71: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 65

Value to set (signed short)

RETURN:[#] TXT

GetLabelOffset 42

Out: Current Value (signed short)

Out: RETURN:[#] TXT

SetFieldsToCheck

43

Unused In: Comma separated list of field ids which should be checked. See 5.5. Out: RETURN:[#] TXT

CheckCurrentLayoutForVisibility

44

In: Minimum height of rendered text in µm.

Out: RETURN:[#] TXT or NOEXIST when a field passed with SetFieldsToCheck does not exist or the height is not available, ILLEGAL

when a passed field is neither TEXT nor SIMPLETEXT FAILURE

when fontheight is too small or for non-reversing print inside the headzone

Reserved for POSScale 45

Reserved for POSScale 46

Reserved for POSScale 47

Reserved for POSScale 48

SetPaperType

Remark: Many settings are stored separately for ticket and for label mode. So always set the correct mode with SetLabelOrTicketMode before calling SetPaperType. An application should always set the paper type. When the application does not set the papertype the driver assumes paper with the width of the printbar. This is necessary for center-load printers. 49

In: 0: legacy 1: ticket 2: label 4: linerless 12: linerless blackmark bottom 20: linerless blackmark top

Out: RETURN:[#] TXT

Page 72: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

66 6.110.95.1.1.022

GetPaperType 50

Out: 0: legacy 1: ticket 2: label 4: linerless 12: linerless blackmark bottom 20: linerless blackmark top

Out: RETURN:[#] TXT

Reserved for POSConfig 51

Reserved for POSConfig 52

Reserved for POSConfig 53

GetDriverCapability 54

In: Capability number

In: type-header, e.g. “BOOL:” Out: value of the capability

Reserved for POSConfig 55

Reserved for POSConfig 56

GetOffsetLinesToPaperCut 57

In: Value to set (signed short)

Out: RETURN:[#] TXT

SetOffsetLinesToPaperCut 58

Out: Current Value (signed short)

Out: RETURN:[#] TXT

GetPrintBarResolution 59 Out: resolution in dots per mm.

Out: RETURN:[#] TXT

GetSensorlessPaperNearEnd 60

Out: 1 feature available 2 feature not available

Out: RETURN:[#] TXT

Internal 61 - -

SetTicketCounter 62

In: Current lines counter to set (signed short) This value will be increased in ticket mode.

Out: RETURN:[#] TXT

GetTicketCounter 63 Out: Counted lines in ticket mode

Out: RETURN:[#] TXT

SetLabelCounter 64

In: Current labels counter to set (signed short) This value will be increased in label mode.

Out: RETURN:[#] TXT

GetLabelCounter 65 Out: Counted labels in label mode

Out: RETURN:[#] TXT

SetTicketCounterLimit 66

In: Set length of paper roll for tickets (in mm).

Out: RETURN:[#] TXT

GetTicketCounterLimit 67

Out: Read length of paper roll for tickets (in mm).

Out: RETURN:[#] TXT

SetTicketCounterWarningDistance 68 In: Set distance (in mm) before

Out: RETURN:[#] TXT

Page 73: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 67

paper end.

GetTicketCounterWarningDistance 69

Out: Distance (in mm) before paper end.

Out: RETURN:[#] TXT

SetLabelCounterLimit 70

In: Set amount of labels on a new paper roll.

Out: RETURN:[#] TXT

GetLabelCounterLimit 71

Out: Get amount of labels on a new paper roll.

Out: RETURN:[#] TXT

SetLabelCounterWarningDistance 72

In: Set distance (in labels) before paper end.

Out: RETURN:[#] TXT

GetLabelCounterWarningDistance 73

Out: Distance before paper end (number of labels).

Out: RETURN:[#] TXT

Page 74: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

68 6.110.95.1.1.022

4.3.2 UPOS String Parser The parser checks/converts the strings with Escape sequences which are e.g. transmitted via PrintNormal. If UseBizerbaExtensions is set, the UPOS sequences are translated into Bizerba sequences. If no UseBizerbaExtensions are set, the BOS Escape sequences are neutralized in a way that the leading BOS Escape character ^ is doubled. This means that the sequences are printed as normal text. Definition of Escape sequence for field ID: ^[Number; Example for selection of field with number 17: ^[17;

Parsing barcode information Barcode information as per UPOS specifications is used:

Symbology

Height, 0 means auto, i.e. height of field in layout mode

Width, 0 means auto

Alignment

Text position

Data that are to be encoded as barcode, whereas the amendmend that is readable as clear text is determined from the data by adopting only the numbers ‘0’ to ‘9’ from the data.

4.3.3 Limits

Currently the implementation does not support operating systems running with 64 bit!

Layout Max. size of label is 128kByte.

File formats / CxImage The format for the label-layout file is BLD XML. In addition to the built-in formats of CxImage also the Jpeg and the PNG format are supported. These are the following image formats:

bmp

gif

jpeg

png

ico

tga

pcx

Page 75: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 69

CxImage uses:

Automatic identification of image format.

Dithering (screening a color image to generate a monochrome image).

Flip (reflection of image via horizontal shaft).

Negatives (inversion of image as it is a monochrome image).

Texts Considerably less than 32kByte!

CodeConversion, embedded 0, string termination Strings with embedded 0 characters are supported within the following functions:

PrintNormal

PrintBarCode

SetLogo

ValidateData

Icons (and other BOS ressources in layouts) If the XML layouts use ressource IDs, they are ignored.

4.3.4 Bizerba text extensions – Basic types of fields

Grundtyp Grundtyp ID Bemerkung LF_TYPE_SIMPLETEXT 11

LF_TYPE_TEXT 4

The BOS formatters only apply here!

LF_TYPE_CODE 6

LF_TYPE_ICON 7

Fields with type LF_TYPE_SIMPLETEXT are only single line fields, control characters

are not interpreted.

Page 76: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

70 6.110.95.1.1.022

4.3.5 Bizerba Text Extensions - Field IDs with basic types

At the application interface data is allocated to a field. However, the transmitted data need to match to the respective basic type. From the UPOSlib view the fieldIDs do not have any significance. The UPOSlib only operates based upon the basic type. Therefore currently there is no handling or verification relevance possible. The expected usage is as follows:

1. Create the layout – file. 2. The person who designed the layout passes the information which field-id was

designed to be used for which purpose. 3. In the implementation the application may check if this field –id is still available,

to detect errors due to changes of the layout or using the wrong layout. 4. If the field-id exists, data is set to this field by the application.

Field Significance Basic type Basic

type ID

1 Weight LF_TYPE_SIMPLETEXT 11

5 Unit price LF_TYPE_SIMPLETEXT 11

6 Special unit price LF_TYPE_SIMPLETEXT 11

7 Price LF_TYPE_SIMPLETEXT 11

8 Special price LF_TYPE_SIMPLETEXT 11

9 Tare LF_TYPE_SIMPLETEXT 11

10 Tare text LF_TYPE_SIMPLETEXT 11

11 PLU number LF_TYPE_SIMPLETEXT 11

14 Operator number LF_TYPE_SIMPLETEXT 11

16 Numerator LF_TYPE_SIMPLETEXT 11

17 Device number LF_TYPE_SIMPLETEXT 11

18 Scale number LF_TYPE_SIMPLETEXT 11

19 Piece per pack. LF_TYPE_SIMPLETEXT 11

21 Unit price dimension LF_TYPE_SIMPLETEXT 11

22 Date text 01 LF_TYPE_TEXT 4

23 Date text 02 LF_TYPE_TEXT 4

24 Date text 03 LF_TYPE_TEXT 4

Page 77: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 71

25 Weight text LF_TYPE_SIMPLETEXT 11

26 Price text LF_TYPE_SIMPLETEXT 11

27 Date 01 LF_TYPE_SIMPLETEXT 11

28 Date 02 LF_TYPE_SIMPLETEXT 11

29 Date 03 LF_TYPE_SIMPLETEXT 11

31 Code 01 LF_TYPE_CODE 6

36 Clock 01 LF_TYPE_SIMPLETEXT 11

49 Difference price LF_TYPE_SIMPLETEXT 11

50 Difference price text LF_TYPE_SIMPLETEXT 11

51 Logo field 01 LF_TYPE_ICON 7

52 Logo field 02 LF_TYPE_ICON 7

53 Logo field 03 LF_TYPE_ICON 7

59 Header logo LF_TYPE_ICON 7

61 Text field 01 LF_TYPE_TEXT 4

62 Text field 02 LF_TYPE_TEXT 4

63 Text field 03 LF_TYPE_TEXT 4

64 Text field 04 LF_TYPE_TEXT 4

65 Text field 05 LF_TYPE_TEXT 4

66 Text field 06 LF_TYPE_TEXT 4

67 Text field 07 LF_TYPE_TEXT 4

68 Text field 08 LF_TYPE_TEXT 4

69 Text field 09 LF_TYPE_TEXT 4

70 Text field 10 LF_TYPE_TEXT 4

71 Special price text LF_TYPE_SIMPLETEXT 11

72 Euro-E LF_TYPE_SIMPLETEXT 11

73 Article text LF_TYPE_TEXT 4

74 Header text LF_TYPE_TEXT 4

79 Footer text LF_TYPE_TEXT 4

92 Net/Fix.weight LF_TYPE_SIMPLETEXT 11

93 Nutrition LF_TYPE_SIMPLETEXT 11

108 Article ID LF_TYPE_SIMPLETEXT 11

109 Store ID LF_TYPE_SIMPLETEXT 11

112 Sec. Unit price LF_TYPE_SIMPLETEXT 11

113 Sec. Price LF_TYPE_SIMPLETEXT 11

Page 78: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

72 6.110.95.1.1.022

114 Sec. Unit price dimension LF_TYPE_SIMPLETEXT 11

116 Sec. Special unit price LF_TYPE_SIMPLETEXT 11

117 Sec. Special price LF_TYPE_SIMPLETEXT 11

118 Sec. Conversion rate LF_TYPE_SIMPLETEXT 11

120 Sec. Difference price LF_TYPE_SIMPLETEXT 11

131 Fixed text LF_TYPE_TEXT 4

132 General textes LF_TYPE_TEXT 4

133 Date of origin LF_TYPE_TEXT 4

146 Static text 01 LF_TYPE_TEXT 4

147 Static text 02 LF_TYPE_TEXT 4

148 Static text 03 LF_TYPE_TEXT 4

149 Static text 04 LF_TYPE_TEXT 4

150 Static text 05 LF_TYPE_TEXT 4

151 Static text 06 LF_TYPE_TEXT 4

152 Static text 07 LF_TYPE_TEXT 4

153 Static text 08 LF_TYPE_TEXT 4

154 Static text 09 LF_TYPE_TEXT 4

155 Static text 10 LF_TYPE_TEXT 4

156 Static text 11 LF_TYPE_TEXT 4

157 Static text 12 LF_TYPE_TEXT 4

158 Static text 13 LF_TYPE_TEXT 4

159 Static text 14 LF_TYPE_TEXT 4

160 Static text 15 LF_TYPE_TEXT 4

161 Static text 16 LF_TYPE_TEXT 4

162 Static text 17 LF_TYPE_TEXT 4

163 Static text 18 LF_TYPE_TEXT 4

164 Static text 19 LF_TYPE_TEXT 4

165 Static text 20 LF_TYPE_TEXT 4

166 Static text 21 LF_TYPE_TEXT 4

167 Static text 22 LF_TYPE_TEXT 4

168 Static text 23 LF_TYPE_TEXT 4

169 Static text 24 LF_TYPE_TEXT 4

170 Static text 25 LF_TYPE_TEXT 4

171 Static text 26 LF_TYPE_TEXT 4

172 Static text 27 LF_TYPE_TEXT 4

173 Static text 28 LF_TYPE_TEXT 4

174 Static text 29 LF_TYPE_TEXT 4

175 Static text 30 LF_TYPE_TEXT 4

176 Static text 31 LF_TYPE_TEXT 4

177 Static text 32 LF_TYPE_TEXT 4

178 Static text 33 LF_TYPE_TEXT 4

179 Static text 34 LF_TYPE_TEXT 4

180 Static text 35 LF_TYPE_TEXT 4

Page 79: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 73

181 Static text 36 LF_TYPE_TEXT 4

182 Static text 37 LF_TYPE_TEXT 4

183 Static text 38 LF_TYPE_TEXT 4

184 Static text 39 LF_TYPE_TEXT 4

185 Static text 40 LF_TYPE_TEXT 4

186 Static text 41 LF_TYPE_TEXT 4

187 Static text 42 LF_TYPE_TEXT 4

188 Static text 43 LF_TYPE_TEXT 4

189 Static text 44 LF_TYPE_TEXT 4

190 Static text 45 LF_TYPE_TEXT 4

191 Static text 46 LF_TYPE_TEXT 4

192 Static text 47 LF_TYPE_TEXT 4

193 Static text 48 LF_TYPE_TEXT 4

194 Static text 49 LF_TYPE_TEXT 4

195 Static text 50 LF_TYPE_TEXT 4

217 Quantity text LF_TYPE_SIMPLETEXT 11

218 Quantity LF_TYPE_SIMPLETEXT 11

219 Piece text LF_TYPE_SIMPLETEXT 11

220 Piece LF_TYPE_SIMPLETEXT 11

223 General text 1 of 4 LF_TYPE_TEXT 4

224 General text 2 of 4 LF_TYPE_TEXT 4

225 General text 3 of 4 LF_TYPE_TEXT 4

226 General text 4 of 4 LF_TYPE_TEXT 4

227 Content bitmap LF_TYPE_ICON 7

230 Data of origin COOL LF_TYPE_TEXT 4

231 Data of origin COOL Trace/Tracking Number

LF_TYPE_SIMPLETEXT 11

232 Discount text LF_TYPE_SIMPLETEXT 11

233 Discount value LF_TYPE_SIMPLETEXT 11

234 DOD data LF_TYPE_TEXT 4

235 DOD passport LF_TYPE_TEXT 4

236 DOD barcode LF_TYPE_CODE 6

239 Calibration Zone LF_TYPE_ICON 7

240 FixLogo LF_TYPE_ICON 7

904 BOS text LF_TYPE_TEXT 4

906 BOS code LF_TYPE_CODE 6

907 BOS icon LF_TYPE_ICON 7

911 BOS SimpleText LF_TYPE_SIMPLETEXT 11

4.3.6 Fonts Until now Bizerba have only proportional fonts, so for the UPOS logic RecLineChars a circa value was defined (in case these fonts are selected).

Page 80: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

74 6.110.95.1.1.022

4.3.7 Label printout - Escape sequences If Bizerba text extensions are active, ^can be printed if ^ is transmitted.

In this mode one call needs to be made per field: o PrintNormal(^[51;\033|3B) for rendering bitmap 3 in field 51 (logo field 01).

o PrintNormal(^[61;hello) for rendering text „hello“ in field 61 (text field 01).

o PrintNormal(^[31;\033|*34Rs104h000w000a-2t-13d1234326056091e) for rendering a barcode in field 31 (Code 01).

Each call-up needs to be started with the field identification^#, whereas # is the number of the addressed field.

ESC characters for printer controlling (paperfeed) are only permitted when filling a text field and have an immediate effect.

Fieldsettings which have been set in the XML-layout are overwritten by these PrintNormal commands.

Page 81: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 75

4.3.8 Bizerba Text Extensions _ Text formatting with Escape

sequences The following Bizerba sequences are identified during rendering of fields of type LF_TYPE_TEXT . All other field types, like e.g. LF_TYPE_SIMPLETEXT, with the exception of only

respond to alignment instructions. Bizerba

sequence Description

\0 Text end

\n Ende of paragraph

\r Separation aid

^^ ^

^Al; Left-aligned paragraph Must occur at the beginning of a paragraph ^Ar; Right-aligned paragraph Must occur at the beginning of a paragraph ^Ac; Centered paragraph Must occur at the beginning of a paragraph ^f+ Framing on ^f- Framing off

^i+ Invers on

^i- Invers off

^x+ Crossing out on ^x- Crossing out off

^u+ Underline on

^u- Underline off

^g+ Greying out on

^g- Greying out off

^h+ Depositing on

^h- Depositing on

^O# Set character distance to # dots Valid values 0..50

^L# Set line distance to # dots Valid values 0..50

^b+ Bold on

^b- Bold off

^# ; Selects font ^[#; FieldID of layout In ticket- mode not permissible! ^tl#; set a „left tab“ at position # In a layout tabs work only in left aligned fields.

^tr#; set a „right tab“ at position # In a layout tabs work only in left aligned fields.

^td#; set a „decimalpoint tab“ at position

#

numbers with decimal point are aligned in a way, that

the decimal points are at the tab position. In a layout

tabs work only in left aligned fields.

^tc#; set a „center tab“ at position # (the word is centered at the tab position. In a layout tabs

work only in left aligned fields.

^tx; Clear tab positions In a layout tabs work only in left aligned fields.

^Ff=<string>; Select fontface E.g.:Andale Mono_V1 for Andale Mono bold

^Fh=#; Select font height

^Fn=<string>; Select fontname E.g.: Andale Mono_V0_H12 Andale Mono bold 12

^H#; Set vertical stretch factor for glyphs

^W#; Set horizontal stretch factor for

glyphs

^X#; Set both vertical and horizontal

stretch factor for glyphs

Page 82: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

76 6.110.95.1.1.022

Supported UPOS Escape sequences Sequence Description Significance / Replaced by . ESC|[#]lF feed lines:

missing number means 1

(see. 5.1)

In label mode only permissible with text data Example: ESC|1lF feeds one line

ESC|[#]uF feed

units/pages/labels:

missing number means 1

(see. 5.1)

In label mode only permissible with text data Example: ESC|1uF feeds one unit

ESC|[#]rF feed lines reverse:

,missing number means

1

(see. 5.1)

In label mode only permissible with text data Example: ESC|1rF feeds one line reverse

ESC|#B print bitmap In label mode only permissible with text data In label mode the referenced image is assigned to field. The referenced image is printed in ticket mode.

ESC|tL print top logo In label mode only permissible with text data In label mode the referenced image is assigned to the field, The referenced image is printed in ticket mode.

ESC|bL print bottom logo In label mode the referenced image is assigned to the field, The referenced image is printed in ticket mode.

ESC|*#Rs#h#w#a#t#d#e print barcode,see OPOS

Standard p.996:

#R:number of following

bytes

s:symbology (4.3.9)

h:height (pixel)

w:fieldwidth

a:aligment in field

(PTR_BC_LEFT,

PTR_BC_CENTER,

PTR_BC_RIGHT)

t:textpos

(PTR_BC_TEXT_NONE,

PTR_BC_TEXT_BELOW)

Human readable text:

falls

PTR_BC_TEXT_BELOW

angegeben und keine

Embedded Sequenz

folgt, wird versucht

den OCR-Text zu

ermitteln.

Alle weiteren

Parameter sind als

Embedded Seq.

anzugeben.

In label mode the referenced barcode is assigned to the field. The referenced barcode is printed in the ticket mode.

In layout-mode a barcode field is disabled when no data is passed, that is when the sequence ends with ‘de’. Nevertheless all other parameters must be valid!

ESC|#fT font selection,

(0=default),1,…

Auswahl FontID

^#;

ESC|bC bold on In label mode only permissible with text data

^b+ ESC|!bC bold off In label mode only permissible with text data

^b- ESC|uC underline on In label mode only permissible with text data

^u+

ESC|#uC underline on In label mode only permissible with text data ^u+

ESC|!#uC underline off In label mode only permissible with text data ^u-

ESC|!uC underline off In label mode only permissible with text data

Page 83: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 77

^u-

ESC|iC italic on select font?

ESC|!iC italic off select font?

ESC|sC Shading on In label mode only permissible with text data ^g+

ESC|#sC Shading on In label mode only permissible with text data ^g+

ESC|0sC Shading off In label mode only permissible with text data ^g-

ESC|cA center In label mode the referenced object is centered in the field . In ticket mode the referenced object is centered over complete print width. ^Ac;

ESC|rA right In label mode the referenced object is arranged right-aligned in the field. In ticket mode the referenced object is arranged right-aligned over the complete print width. ^Ar;

ESC|lA left In label mode the referenced object is arranged left-aligned in the field. In ticket mode the referenced object is arranged left-aligned over the complete print width. ^Al;

ESC|1C single high and wide select font?

ESC|2C double wide select font?

ESC|3C double high select font?

ESC|4C double wide+high select font?

ESC|stC strike through on In label mode only permissible with text data

^x+ ESC|#stC strike through on In label mode only permissible with text data

^x+ ESC|!#stC strike through off

In label mode only permissible with text data

^x- ESC|!stC strike through off In label mode only permissible with text data

^x- ESC|rvC reverse video on In label mode only permissible with text data

^i+ ESC|!rvC reverse video off In label mode only permissible with text data

^i- ESC|N normal In label mode only permissible with text data

^i-^x-^u-^g-^b-^0; ^ If Bizerba text

extensions are not

active, then

replacement is

started!!!!

^^

ESC|*#E embedded data Bizerba Embedded Esc-

Sequences always have BIZ

right after the E.

The following character are

already in use after BIZ:

- T…

TODO specify:

When following a Barcode

sequence:

flags to

force,dots,ratio,composite

string, ocr string

TODO specify:

When following a Bitmap

sequence:

for passing alignment,

width,size?

TODO specify:

When following a field-id

sequence:

field parameters…

Page 84: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

78 6.110.95.1.1.022

Non-supported UPOS Escape sequences

Sequenz Beschreibung

ESC|[#]fC RGB color => invalid, ignored

ESC|[!]tbC subscript => invalid, ignored

ESC|[!]tpC superscript => invalid, ignored

ESC|#hC scale horizontally => invalid, ignored

ESC|#vC scale vertically => invalid, ignored

ESC|[#]rC other color => invalid, ignored

ESC|[#]P paper cut => invalid, ignored

ESC|[#]fP feed & paper cut => invalid, ignored

ESC|[#]sP feed & paper cut&stamp => invalid, ignored

ESC|sL stamp => invalid, ignored

ESC|*#dL print line => invalid, ignored

4.3.9 Barcodes

The following barcodes are supported:

Barcode name Alternative name

CODE_ID_EAN13 PTR_BCS_EAN13

PTR_BCS_YESN13

CODE_ID_EAN8 PTR_BCS_EAN8

PTR_BCS_YESN8

CODE_ID_EAN128 PTR_BCS_EAN128

GS1-128

CODE_ID_CODE128 PTR_BCS_Code128

CODE_ID_25INT PTR_BCS_ITF

CODE_ID_CODE39 PTR_BCS_Code39

CODE_ID_RSS14

PTR_BCS_GS1DATABAR

PTR_BCS_GS1DATABAR_S

CODE_ID_RSSX

PTR_BCS_GS1DATABAR_E

PTR_BCS_GS1DATABAR_E_S

4.3.10 Extended Error Codes

The following methods provide extended error information:

printNormal, printBitmap, printBarcode

transactionPrint

pageModePrint Using OPOS you can read this information from the property ResultCodeExtended. When JPOS is used you get this information within an JposException () or an ErrorEvent. In addition to the extended error codes defined by the UPOS standard (e.g. EPTR_REC_EMPTY) the Bizerba implementation defines additional values. The following Bizerba specific extended error codes are defined:

Extended Error Name Value Remarks

UPOS_BIZ_EPTR_NOLABELFOUND 261 See also 4.4 and 5.1

and following

Page 85: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Functional and data description

6.110.95.1.1.022 79

4.3.11 Firmware Updates

There are Kratos and Cogos printers which differ in the printbar, i.e. both require different firmware versions to ensure the correct printer head voltage. To run a Firmware update, the firmware file fitting to the hardware needs to be entered on the API. In case the incorrect file is transmitted, the update routine is cancelled provided that a Kratos or a Cogos firmware in the printer is active. ! !!!!! Attention!!!!!! !! If the factory-set Atmel firmware is active, the routine cannot identify which hardware was used. It presumes that the file was selected appropriately (initial installation of hardware)! If the incorrect firmware is applied, the printer head is damaged in worst case. !!!!!! Attention!!!!!! !! The factory-set Atmel firmware is automatically activated as a fallback, if a problem occurs when applying the firmware!

4.3.12 Multi-Printer-Support

For each physical printer an instance is created at UPOS level. If one process makes several instances, the UPOS instance will be shared. Since the UPOS level is not multithread safe the OPOS implemenatation will serialize the calls. The JPOS implementation doesn’t do this, so the application can only make calls from one single thread.

4.3.13 Paper end

The application should poll for paper end after a print-job by checking the RecEmpty() property. If the printer recognizes paper end the printer will block all commands until one of the followed conditions occur:

Ticket mode: LineFeed (or FormFeed) command

Label mode: Set label mode (DirectIO 19) or better: start learn mode: (DirectIO 1)

4.4 Asynchronous printing

Beginning with V2.34 asynchronous printing is implemented.

To support layout –based label print in addition to the specification of the UPOS-standard the PageModePrint command is handled asynchronously. UPOS V1.13 declares this function as synchronous.

Asynchronous label-print may fire ErrorEvent(E_EXTENDED, UPOS_BIZ_EPTR_NOLABELFOUND).

This error condition has been introduced to enable the application to handle paper error conditions appropriately.

On ErrorEvent(EXTENDED, OPOS_EPTR_REC_EMPTY) the application should display a hint to insert the paper. When this occurs on a label printer the paper insertion will be confirmed with an ErrorEvent(E_EXTENDED, UPOS_BIZ_EPTR_NOLABELFOUND). At this point

Page 86: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Functional and data description Interface for RIK Printer Module

80 6.110.95.1.1.022

the application must do a form-feed to force the hardware to position the paper correctly. This will also release the NOLABELFOUND state.

Page 87: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 81

5 Detailed Descriptions

5.1 Paper handling / feeding

There are three use cases to print:

Label-Print on labels

Label-Print on tickets

Immediate ticket printing

To place objects (text, icons, barcodes) on the paper there are three sequences you can use at API-level in addition to using a layout:

Newline (\n)

Linefeed which is implemented as a dotfeed (ESC|[#]lF, ESC|[#]rF)

Formfeed (ESC|[#]uF)

All of them can be placed in the normal data strings e.g. for a PrintNormal, but they behave differently depending on the use case which is currently running.

5.1.1 Label-Print on labels (using an xml-layout file)

You enter this case by calling PageModePrint(PAGE_MODE)+DirectIO(LOADLAYOUT)+SetLabelOrTicketMode(LABEL)

After Newline rendering will continue in the next line in the specified field

Newline is ignored on fields of type SimpleText

Beginning with V2.56 linefeeds and formfeeds are queued like all PrintNormal commands for the case that a transaction is currently open. I you need the old behaviour you may use the appropriate DirectIO commands which will feed immediately.

To use this in PageMode you must send the intended feed-command to any field of type text. Example: PrintNormal(0,”^[74;\033|120lF”)

Reminder: In pagemode the PrintNormal command always assigns data to a field.

FormFeed will feed to the next label

Beginning with Version 2.24 when paper is out: PageModePrint(PAGE_NORMAL)

The OPOS implementation returns OPOS_E_EXTENDED (retval) and sets the ResultCode = E_EXTENDED and ResultCodeExtended properties (including EPTR_REC_EMPTY).

The JPOS implementation throws an exception (including errorCode and errorCodeExtended).

What to do when paper is out:

Page 88: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

82 6.110.95.1.1.022

The user should receive a message that the paper is out, to insert new paper

When paper is inserted, the next print-job must start with DirectIO(Learning_MODE). The printer feeds to the start position of the next label. From now on GetRecEmpty can be called to get the accurate paperstate

without feeding.

DirectIOs to configure papers:

DirectIO(SetReversingDistance) [optional, default is calculated]

Other details are taken from the layoutfile (e.g. renderwidth or reversing)

Page 89: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 83

Reversing: By default after you print layouts on label-paper the label is fed immediately to the cutting-edge so you can take-off the label. While beginning the next label the printer draws the paper back to continue printing on top of the next label. This is called: Reversing-mode To avoid this time-consuming reverse-feeding usually the designers place the static parts of the labels on top (called the head-zone). Because the head-zone is always the same on any label it can be pre-printed. This is called Non-Reversing-mode. Sample:

During the label-design you can select the non-reversing mode by setting the reversing property to false. The POSPrinter driver then moves the head zone of the label to the top of the next label. Sample:

Page 90: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

84 6.110.95.1.1.022

Caution with Reversing: Paper reversing may lead to paper jam or paper out conditions. You may get these kind of errors even when the reversing distance is less than the cutting-edge to printing bar. light barrier for paper out detection print bar Normal paper guide Paper-out condition due to reversing paper cutting edge

Normal paper position risky paper position due to reversing, may result in paper jam

This depends on printer type, paper type and the amount of the remaining paper.

5.1.2 Label-Print on ticket-paper (using an xml-layout file) You enter this case by calling PageModePrint(PAGE_MODE)+DirectIO(LOADLAYOUT)+SetLabelOrTicketMode(TICKET)

After Newline rendering will continue in the next line in the specified field

Newline is ignored on fields of type SimpleText

Beginning with V2.56 linefeeds and formfeeds are queued like all PrintNormal commands for the case that a transaction is currently open. I you need the old behaviour you may use the appropriate DirectIO commands which will feed immediately.

To use this in PageMode you must send the intended feed-command to any field of type text.

Example: PrintNormal(0,”^[74;\033|120lF”)

Reminder: In pagemode the PrintNormal command always assigns data to a field.

The queuing of PrintNormal paper-feeding-sequences enables the application to print quicker when you print on ticket- or linerless paper. To do this just use a transaction for your printout and include the feeding commands as a part of the transaction. The result is, that reverse-feeds e.g. at the beginning of the printout mustn’t be explicitly synchronized any more. The feed-to-papercut at the end of the printout is performed without stopping the printer after the printjob.

FormFeed the length of a label.

Page 91: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 85

Beginning with Version 2.24 when paper is out: PageModePrint(PAGE_NORMAL)

The OPOS implementation returns OPOS_E_EXTENDED (retval) and sets the ResultCode = E_EXTENDED and ResultCodeExtended properties (including EPTR_REC_EMPTY).

The JPOS implementation throws an exception (including errorCode and errorCodeExtended).

What to do when paper is out:

The user should receive a message that the paper is out, to insert new paper

When paper is inserted, the next print-job will succeed. Remark: The printer updates the paper-out status after the next print-job

When paper is inserted, the next print-job must start with DirectIO(Learning_MODE). From now on GetRecEmpty can be called to get the

accurate paperstate without feeding.

DirectIOs to configure papers:

Details are taken from the layoutfile (e.g. paperwidth or reversing)

5.1.3 Ticket-Print (without using an xml-layout file)

You enter this case by calling PageModePrint(NORMAL)+DirectIO(LOADLAYOUT)+SetLabelOrTicketMode(LABEL)+...

Printer Commands like Printer Speed directives are executed immediately and will take action when the next time the printer buffer is flushed.

A newline (‘\n’) as a last character of a string passed to PrintNormal will flush the

line buffer and start printing.

After Newline rendering will continue in the next line

Linefeed will feed the specified dots and continue with rendering in the next line

Formfeed will feed the distance from the strip to the paper-cut and continue with rendering in the next line. This distance depends for the different printer types. The default value depends on the printer-type and is an average value which fits for most of the printers-variants of the type. If this is not ok for you, you can adapt that value for you needs via DirectIO.

Beginning with Version 2.24 when paper is out: In NON-transaction mode: PrintNormal and PrintBarcode:

return E_EXTENDED + EPTR_REC_EMPTY when paper is out. The OPOS implementation returns OPOS_E_EXTENDED (retval) + EPTR_REC_EMPTY (out param) and sets the ResultCode = E_EXTENDED and ResultCodeExtended properties (including EPTR_REC_EMPTY). The JPOS implementation throws an exception (including errorCode and errorCodeExtended). TransactionPrint and PrintBitmap:

The OPOS implementation returns OPOS_E_EXTENDED (retval) and sets the ResultCode = E_EXTENDED and ResultCodeExtended properties (including EPTR_REC_EMPTY). The JPOS implementation throws an exception (including errorCode and errorCodeExtended). TransactionPrint and PrintBitmap:

Page 92: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

86 6.110.95.1.1.022

The OPOS implementation returns OPOS_E_EXTENDED (retval) and sets the ResultCode = E_EXTENDED and ResultCodeExtended properties (including EPTR_REC_EMPTY). The JPOS implementation throws an exception (including errorCode and errorCodeExtended).

What to do when paper is out:

The user should receive a message that the paper is out, to insert new paper

When paper is inserted, the next print-job will succeed. Remark: The printer updates the paper-out status after the next print-job

When paper is inserted, the next print-job must start with DirectIO(Learning_MODE). From now on GetRecEmpty can be called to get the

accurate paperstate without feeding.

DirectIOs to configure papers:

DirectIO(SetLabelLength)

DirectIO(SetLabelsGap)

DirectIO(SetPaperWidth)

Optional: DirectIO(SetOffsetLabelPositioning)

Print-Bar temperature: To avoid print bar destruction before each print job the application must check the temperature by calling DirectIO(15). If the result is 2 (Temperature NOK) printing must be paused to allow the print bar to cool down.

Page 93: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 87

5.1.4 Parameters for paper- and layout- handling Overview of relevant parameters:

To enable the application to send only content and not configuration data the following enhancements have been implemented:

Begining with version 2.30 parameters are used from the XML-Layout file.

Length and width of the paper cannot be set by the application via the API. The setters are deprecated, the getters are still available.

Position of the layout is taken from the XML file including some offsets. Additionally PageModeVerticalPosition is implemented. So after loading the layout the vertical position can be corrected by using PageModeVerticalPosition. The value is temporary until the next LoadLayout call.

To adapt to tolerances of the printer hardware additional parameters have been introduced: offset label position

Details:

Name Description POS-API Order

layout offset x Moves all layout positions before rendering horizontally.

- 1. From XML

layout offset y Moves all layout positions PageModeVerticalPosition 1. From XML

labels gap

label offset

layout height label length

offset label positioning and reversing distance

layout offset y

cutting edge

light barrier

layout offset x backing paper

layout

label

layoutposition (no offset) layout width

paper width

Page 94: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

88 6.110.95.1.1.022

before rendering vertically.

! Be careful when using this in non-reversing mode of the label print !

In non-reversing mode this parameter will probably not have the effect you may expect.

2. From API until reload (writing overwrites value from XML, reading after Loading the XML returns value from XML)

layout height Height of the layout (vertical render zone).

- 1. From XML

layout width Width of the layout (horizontal render zone).

- 1. From XML

labels gap The distance between the labels.

DirectIO(21) (SetLabelsGap) DirectIO(22) (GetLabelsGap)

1. From XML

POSConfig r/o !

label length The physical length/height of the label (label-paper/sticker).

DirectIO(26) (SetLabelLength) DirectIO(27) (GetLabelLength)

1. From XML

POSConfig r/o ! d.h. Config bekommt den Wert beim Laden eines Layouts gesetzt => POSConfig / API nur zur Anzeige/abfrage

offset label position

Vertical offset to the calculated positioning of the label. You can adapt this when the label cannot be taken off easily or when the label ejects too far.

DirectIO(33) (SetOffsetLabelPositioning) DirectIO(34) (GetOffsetLabelPositioning)

1. From POSConfig

paper width

[for ticket

printing,

And all

printers with

center-load

(XC)]

The physical width of the label (label-paper/sticker).

DirectIO(38) (SetPaperWidth) DirectIO(39) (GetPaperWidth)

1. From API (persistent)

1. From POSConfig (persistent)

label offset Offset from top of the label to the position where the light barrier detects the label.

You can adapt this value if you have non rectangular labels, e.g. round shapes,…

DirectIO(41) (SetLabelOffset) DirectIO(42) (GetLabelOffset)

1. From XML

2. From API until reload (temporary)

POSConfig r/o ! d.h. Config bekommt den Wert beim Laden eines Layouts gesetzt => POSConfig / API nur zur

Page 95: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 89

Anzeige/abfrage

reversing distance

Distance to feed in reversing mode.

In reversing mode the label is drawn back by the length of this parameter. If the value is smaller than about 8mm you can also reduce the pre-printing length.

! The pre-printing length is limited by the hardware and depends on the printer type!

DirectIO(23) (SetReversingDistance) DirectIO(24) (GetReversingDistance)

1. From API (persistent)

1. From POSConfig (persistent)

5.1.5 Status Update Event Between transactionPrint start and transactionPrint stop the paper is not moved and the driver does not check the paper-state. This is to optimize performance. The assumption is that when an out of paper error occurs during a transaction it does not matter whether it occurred at the end or in the middle of the transaction. The print job must be repeated in any way.

5.1.6 Paper Near End Currently Bizerba printers do not have a paper-near-end hardware sensor. That’s why the CapRecNearEndSensor capability always returns false. To provide a similar paper-near-end functionality we implemented this feature based on statistic values (counters). In ticket mode the printer is counting lines, in label mode labels are counted. With DirectIO (60==GetSensorlessPaperNearEnd) the application can check whether this feature is available or not. The concept is to set the counter to 0 when a new paper-roll is inserted (DirectIO 62== SetTicketCounter or 65== SetLabelCounter). By calling DirectIOs (66== SetTicketCounterLimit or 70== SetLabelCounterLimit) you can specify the total length or amount of labels of the roll. The application can set the warning distance (DirectIO 68== SetTicketCounterWarningDistance or 72== SetLabelCounterWarningDistance). The driver fires Status -Update events with code PaperNearEnd when the distance to the end is lower than the warning distance. All values can be set from within a POSConfig dialog. The only exception is the reset of the counter when the paper is changed. Before you call the mentioned commands you must set the papertype (DirectIO 49).

Page 96: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

90 6.110.95.1.1.022

5.2 Specifying the layout via the API

5.2.1 Uniqueness of the fields

Fields are addressed by field ids. A field can be placed more than once on the same label-layout. The XML-description of the layout can specify attributes for each instance of this field. Example: Textfield 01 (ID 61) can be placed twice in a layout. If you assign text to this field by using id 61the text will be used in both instances. If the xml-specifies a frame only for the first instance consequently the text of the second field will have no frame.

5.2.2 Text Attributes / Formatting text

Font selection (including double width and/or height)

is not changed until another font is selected or a close is done.

Alignment selection

is not changed until a Newline (\n) is found. In label mode after the Newline the default alignment from the field-information (XML) is selected. In ticket mode aligment defaults to left aligment.

Must be placed at the beginning of a paragraph (text up to the next Newline character). Following alignment commands will be ignored.

Text Formatters (bold, underline,…)

Take effect across paragraphs.

5.3 Barcodes

Beginning with V2.38 the API returns an error if the barcode does not fit into a field. This can be disabled by passing \033|*16EBIZBCD;CLIP=TRUE after a field identifier for label print or before sending barcode data in ticket print.

The number of lines used for stacked barcodes can be changed to 3 (for example) by sending a \033|*13EBIZBCD;COLS=3 sequence.

PTR_BCS_Code128_Parsed:

The special characters for SHIFT, CODE A, CODE B, CODE C, FNC1 FNC2 FNC3 FNC4 and { are implemented.

PTR_BCS_GS1DATABAR, PTR_BCS_GS1DATABAR_E, PTR_BCS_GS1DATABAR_S and

PTR_BCS_GS1DATABAR_E_S accept {1 as a sequence for FNC1.

5.4 Locale Support (Right to left rendering order)

If you want to use right to left rendering, for e.g. Arabic or Hebrew texts you have to call the DirectIO(SetRightToLeft) to enable the support. If you use XML-Layouts you have to use at least BLD V6.02.

5.5 Support of implementation for regulatory/legal demands of

public authorities

e.g. PTB (Physikalisch- Technische Bundesanstalt) This chapter is only relevant for layout-based printing!

Page 97: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 91

Because of regulatory or legal demands some applications need to ensure that rendered text is readable. For doing this a checks for minimum font-height on printout is needed. To address this issue we advise application implementers to follow one of the two main scenarios described in this chapter. The objective is to lower the complexity of application code to fulfil these regulatory or legal needs. Scenario one: Application controls visibility directly In this scenario the application may set any desired font on any field at any time. To ensure that the rendered text will never be smaller than a minimum size the application should use the dynamic visibility checks of POSPrinter as described in 5.5.1. Scenario two: Application controls visibility indirectly In this scenario the application must never set a fontsize / never change the fontface directly. All font selections are provided statically in the layout file (XML). To ensure that the rendered text will never be smaller than a minimum size the application should use the static visibility checks of POScale as described in 5.5.2.

5.5.1 Dynamic visibility checks of fields of a layout (POSPrinter) Pro: application may change font and typeface at any time Con: Check needed before any print This check can be achieved by using the ‘CheckCurrentLayoutForVisibility’ command of POSPrinter after providing all data to the fields which need to be rendered. This is typically immediately before initiating the print (PageMode…). This means the layout is loaded and all data is populated to the fields. Step 1: Set the fields to be checked (DirectIO 43) Step 2: Check the fields (DirectIO 44= CheckCurrentLayoutForVisibility) The check fails if one of the fields (passed by DirectIO 43) contains text smaller that the micrometers passed as an argument to DirectIO 44. It also fails when one of the fields is inside the head zone (Only non-reversing). This check is for applications which may change the fontsize after loading the layouts. Beginning with V2.30 there are two checks which may be used to check the layout statically: Check layout headzone and check layout calibration. Call these two DirectIOs in POSScale!

5.5.2 Static visibility checks of fields of a layout (POSScale) Pro: check is only necessary on layout load (once during runtime) Con: no font / typeface change without changing the layout file

This means especially, that the application never uses font/typeface selection

commands! Generally the application-provider is responsible to ensure the correct printing sizes. When it is not possible that the application uses an inappropriate layout you may check the layout file only once during deployment / distribution. This is typically true for embedded / closed systems.

Page 98: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

92 6.110.95.1.1.022

When the distribution of layouts is not controlled in an appropriate manner the easiest way to ensure the readability of text (minimum font height) is to use enhancements for the static layout checks. These enhancements are based on a special field “calibration zone”. The field id for the calibration zone is always 239. By using the calibration zone you can perform two checks:

Check 1 (CHECKLAYOUT_HEADZONE): This check fails under the following circumstances:

- If fields considered as relevant (-> SET_ERFIELDS) are inside the headzone the check fails. Requirement: Relevant fields must be printed and fed out of the printer, so that the customer always gets it. Background: When using the non-reversing mode the headzone is moved to the end of the label to be preprinted for the next label. Therefore it must never contain relevant fields.

- If the layout has a calibration zone the calibration zone must not overlap the headzone.

Check 2 (CHECKLAYOUT_CALIBZONE): This check fails under the following circumstances:

- All fields inside the calibration zone must not overlap. (A Bizerba proprietary exception is field 55, the region for drawing the lines) If it overlaps more, the check fails.

- If a layout contains a calibration zone all “relevant fields” (->SET_ERFIELDS) must be inside the calibration zone, otherwise the check fails.

- If the font of the “relevant fields” (->SET_ERFIELDS) is smaller than the minimum height (passed with the API call) the check fails.

- All relevant fields for this check must be contained in the layout. How to check a layout statically for minimum font height: Step 1: Design a layout with a calibration zone

This is a sample of a layout with calibration zone. In the screenshot the calibration zone has a background with colour light green. Step 2: If you only have layouts with calibration zone you may indicate this by DirectIO

(46 = ONLY_ACCEPT_FILES_WITH_CZONE). After this all layout-load will fail for

Calibration zone

Page 99: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 93

files without calibration zone. This DirectIO is also available in POSPrinter (46 = ONLY_ACCEPT_FILES_WITH_CZONE).

Step 3: Load the layout to check into POSScale (DirectIO 45 = SET_LAYOUTFILE_FOR_CHECK) Step 4: Pass a comma separated list of field ids to POSScale with all fields which must

be checked for readability (DirectIO 43 = SET_ERFIELDS). If you omit this call the Bizerba default ids are used.

Step 5: Now you can perform the headzone check (DirectIO 47 = CHECKLAYOUT_HEADZONE).

Step 6: Now you can perform the headzone check (DirectIO 48 = CHECKLAYOUT_CALIBZONE)

5.5.3 Bizerba Defaults Bizerba recommends assigning and using the field ids a mentioned in 4.3.5. Of course you can fill data to the fields as it is appropriate for your needs. The table is the list of field ids Bizerba considers to be relevant for height checks because of legal aspects:

Field ID Description

1 Weight

5 Unit price

6 Special unit price

7 Price

8 Special price

9 Tare

10 Tare text

19 Piece per pack.

21 Unit price dimension

25 Weight text

26 Price text

92 Net/Fix.weight

112 Sec. Unit price

113 Sec. Price

114 Sec. Unit price dimension

116 Sec. Special unit price

117 Sec. Special price

217 Quantity text

218 Quantity

219 Piece text

220 Piece

Since these are not relevant for every layout the POSPrinter defines the following default:

Page 100: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

94 6.110.95.1.1.022

The Fields 1, 5 and 7. are considered as relevant for checking with CHECKLAYOUT_CALIBZONE. You can change this with DirectIO(SET_ERFIELDS).

5.6 Paper saving with AUTOSIZE

5.6.1 Auto sizing on layout-level

The ticket print on the left is done using a standard layout with a field providing space for several lines. If these lines are not used the field consumes useless space on the paper. The feature works by clipping empty fields and resizing filled fields when they only contain white space. To enable the paper-saving feature for a loaded layout you can pass the following sequence with a PrintNormal: \033|*20EBIZLAY;AUTOSIZE=TRUE

This sequence enables the resizing of the layout to shrink or grow with the fields inside the layout. Growing is limited to the buffer size (max. 4800 lines). Fields are not modified by this sequence. You need to enable autosizing of at least one field to use this feature successfully. Restrictions:

The described layout-AUTOSIZE feature does not allow autosizing-fields placed next to field or over fields!

If you want to reduce the effects of the autosize feature, then fields should have a border size matching the content size.

Any rotation is not allowed when autosize is active.

This is not supported for printing labels / non reversion mode

Overlapping fields may have unwanted results, because the compression algorithm moves following fields up. Example:

will print like

Page 101: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 95

5.6.2 Auto sizing on field-level To use autosize on field-level CLIPEMPTYFIELDS is necessary on layout level. This is set by the following PrintNormal sequence: \033|*27EBIZLAY;CLIPEMPTYFIELDS=TRUE

Then you can activate AUTOSIZE on field-level with the following PrintNormal sequence:

\033|*20EBIZFLD;AUTOSIZE=TRUE

This sequence must follow the field sequence for which this attribute is to set. Example for setting AUTOSIZE on field no. 73: ^[73;\033|*20EBIZFLD;AUTOSIZE=TRUE

Restrictions:

The described autosize feature does not allow fields placed next to each other or over each other!

If you want to reduce the effects of the autosize feature, then fields should have a border size matching the content size.

Any rotation is not allowed when autosize is active.

This is not supported for printing labels / non reversion mode

Overlapping fields may have unwanted results, because the compression algorithm moves following fields up.

Page 102: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Detailed Descriptions Interface for RIK Printer Module

96 6.110.95.1.1.022

5.7 TrueType support (beginning with V 2.62)

5.7.1 General description Bizerba currently provides four Typefaces for the printer device. Typeface one is a set of Bizerba specific fonts. Up to V 2.61 three sizes were added with typeface SimSun. eight with typeface Arial Unicode and nine with typeface Andale Mono. The names of the typefaces are non-speaking and not really good to use. The UPOS standard describes a list of fonts faces (GetFontTypefaceList) and list of sizes (RecLineCharsList) which help the application to select desired font and size. The pre 2.62 implementation provides a list of fontnames where each font represents one size of that font. The SetRecLineChars method changes the selected font to change the size which is what the user expects, but violates the standard definitions. The long typeface list is misleading and should only contain one entry per font face. This is corrected with Version 2.62. This is the new fontlist:

FontFace IDs Monospaced or

Proportional Font

Comment

Bizerba 1-34 Proportional OK to use, internal face name

SimSun 35-37 Proportional Legacy, deprecated

Arial Unicode 38-45 Proportional Legacy, deprecated

Andale Mono 46-54 Monospaced Legacy, deprecated

SimSun 55 Proportional OK to use, usable typeface name

Arial Unicode 56 Proportional OK to use, usable typeface name

Andale Mono 57 Monospaced OK to use, usable typeface name

As a consequence new “well behaving” UPOS applications should only use fonts 55, 56 or 57.

5.7.2 Feature description Before V2.62 all fonts were statically linked to every implementation which had a negative impact on RAM consumption, render quality and flexibility. With V2.62 the fonts are dynamically rendered. That means each font is rendered to fit to the desired size of RecLineCharsList which improves the quality of the printout. Only referenced glyphs are rendered which saves RAM usage and increases performance. The glyphs are pre-rendered and stored in the filesystem. Take care to have enough free disk space (300 MB should be sufficient for most cases). Additionally typeface italic and bold-italic are available by synthesizing from the regular font face. To achieve optimum performance the application should try to avoid glyphs which do not exist in the ttf. This could be done once by the developers of the application by

Page 103: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for RIK Printer Module Detailed Descriptions

6.110.95.1.1.022 97

using DirectIO(UnicodeCharExistsInFont) to check for availability of the glyphs. To decrease the first initialization time the application might install the fontcache -folder so that the device mustn’t render the glyphs.

5.7.2.1 Proportional Fonts UPOS selects the sizes by chars per line. This is an inherent problem with proportional fonts, because it is undefined which character width is used to calculate the chars per line. The Bizerba implementation uses the ‘0’ decimal character (ascii 048=0x30) to calculate the appropriate size for proportional fonts.

5.7.2.2 Support of Italic The Sequence for Italic font (ESC|iC) is ignored for the Bizerba fonts (ids 1-34).

5.7.2.3 Bizerba Escape Sequences The following new Bizerba Escape Sequences have been introduced to support future versions of layout-files. ^Ff=<string>; Select fontface

^Fh=#; Select font height

^Fn=<string>; Select fontname

^H#; Set vertical stretch factor for glyphs

^W#; Set horizontal stretch factor for glyphs

^X#; Set both vertical and horizontal stretch factor for glyphs

A normal UPOS application does not need these sequences so do not use them, because they are considered internal and subject to change at any time. They are intended for future use where future versions of layout-files reference any TTF font and font-sizes are freely selectable, without any grid.

Page 104: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Appendix Interface for Bizerba RIK weighing modules

98 6.110.95.1.1.022

6 Appendix

6.1 Constants

Following constants of the POS specification will be used: Label mode: if (Alignment == 0) then use default alignment of layout

6.1.1 Failure

/////////////////////////////////////////////////////////////////////

// OPOS "ResultCode" Property Constants

/////////////////////////////////////////////////////////////////////

const LONG OPOS_SUCCESS = 0;

const LONG OPOS_E_CLOSED = 101;

const LONG OPOS_E_CLAIMED = 102;

const LONG OPOS_E_NOTCLAIMED = 103;

const LONG OPOS_E_NOSERVICE = 104;

const LONG OPOS_E_DISABLED = 105;

const LONG OPOS_E_ILLEGAL = 106;

const LONG OPOS_E_NOHARDWARE = 107;

const LONG OPOS_E_OFFLINE = 108;

const LONG OPOS_E_NOEXIST = 109;

const LONG OPOS_E_EXISTS = 110;

const LONG OPOS_E_FAILURE = 111;

const LONG OPOS_E_TIMEOUT = 112;

const LONG OPOS_E_BUSY = 113;

const LONG OPOS_E_EXTENDED = 114;

const LONG OPOS_E_DEPRECATED = 115; // (added in 1.11)

const LONG OPOSERR = 100; // Base for ResultCode errors.

const LONG OPOSERREXT = 200; // Base for ResultCodeExtendedErrors.

const LONG OPOS_EPTR_REC_EMPTY = 203; // (Several)

const LONG UPOS_BIZ_EPTR_NOLABELFOUND = 261

const LONG UPOS_BIZ_EPTR_PAPER_REMOVED_AFTER_LABELFOUND 262

6.1.2 UPOSlibPrintBitmap / UPOSlibSetBitmap / PrintNormal

//** "Width" Parameter

// Either bitmap width or:

const LONG PTR_BM_ASIS = -11; // One pixel per printer dot

//** "Alignment" Parameter

// Either the distance from the left-most print column to the start

// of the bitmap, or one of the following:

const LONG PTR_BM_LEFT = -1;

const LONG PTR_BM_CENTER = -2;

const LONG PTR_BM_RIGHT = -3;

6.1.3 Firmwareupdate

/////////////////////////////////////////////////////////////////////

// "CompareFirmwareVersion" Method: "Result" Parameter Constants

// (added in 1.9)

/////////////////////////////////////////////////////////////////////

const LONG OPOS_CFV_FIRMWARE_OLDER = 1;

const LONG OPOS_CFV_FIRMWARE_SAME = 2;

const LONG OPOS_CFV_FIRMWARE_NEWER = 3;

const LONG OPOS_CFV_FIRMWARE_DIFFERENT = 4;

const LONG OPOS_CFV_FIRMWARE_UNKNOWN = 5;

Page 105: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for Bizerba RIK weighing modules Appendix

6.110.95.1.1.022 99

6.1.4 UPOSlibPrintBarcode / PrintNormal

//** "Alignment" Parameter

// Either the distance from the left-most print column to the start

// of the bar code, or one of the following:

const LONG PTR_BC_LEFT = -1;

const LONG PTR_BC_CENTER = -2;

const LONG PTR_BC_RIGHT = -3;

//** "TextPosition" Parameter

const LONG PTR_BC_TEXT_NONE = -11;

const LONG PTR_BC_TEXT_ABOVE = -12;

const LONG PTR_BC_TEXT_BELOW = -13;

//** "Symbology" Parameter:

// - One dimensional symbologies

const LONG PTR_BCS_UPCA = 101; // Digits

const LONG PTR_BCS_UPCE = 102; // Digits

const LONG PTR_BCS_YESN8 = 103; // = EAN 8

const LONG PTR_BCS_EAN8 = 103; // = YESN 8 (added in 1.2)

const LONG PTR_BCS_YESN13 = 104; // = EAN 13

const LONG PTR_BCS_EAN13 = 104; // = YESN 13 (added in 1.2)

const LONG PTR_BCS_TF = 105; // (Discrete 2 of 5) Digits

const LONG PTR_BCS_ITF = 106; // (Interleaved 2 of 5) Digits

const LONG PTR_BCS_Codabar = 107; // Digits, -, $, :, /, ., +;

// 4 start/stop characters

// (a, b, c, d)

const LONG PTR_BCS_Code39 = 108; // Alpha, Digits, Space, -, .,

// $, /, +, %; start/stop (*)

// Also has Full ASCII feature

const LONG PTR_BCS_Code93 = 109; // Same characters as Code 39

const LONG PTR_BCS_Code128 = 110; // 128 data characters

// - One dimensional symbologies (added in 1.2)

const LONG PTR_BCS_UPCA_S = 111; // UPC-A with supplemental

// barcode

const LONG PTR_BCS_UPCE_S = 112; // UPC-E with supplemental

// barcode

const LONG PTR_BCS_UPCD1 = 113; // UPC-D1

const LONG PTR_BCS_UPCD2 = 114; // UPC-D2

const LONG PTR_BCS_UPCD3 = 115; // UPC-D3

const LONG PTR_BCS_UPCD4 = 116; // UPC-D4

const LONG PTR_BCS_UPCD5 = 117; // UPC-D5

const LONG PTR_BCS_EAN8_S = 118; // EAN 8 with supplemental

// barcode

const LONG PTR_BCS_EAN13_S = 119; // EAN 13 with supplemental

// barcode

const LONG PTR_BCS_EAN128 = 120; // EAN 128

const LONG PTR_BCS_OCRA = 121; // OCR "A"

const LONG PTR_BCS_OCRB = 122; // OCR "B"

// - One dimensional symbologies (added in 1.8)

const LONG PTR_BCS_Code128_Parsed=123; // Code 128 with parsing

// The following RSS constants deprecated in 1.12.

// Instead use the GS1DATABAR constants below.

const LONG PTR_BCS_RSS14 = 131; // Reduced Space Symbology - 14 digit

GTIN

const LONG PTR_BCS_RSS_EXPANDED = 132; // RSS - 14 digit GTIN plus

additional fields

// - One dimensional symbologies (added in 1.12)

const LONG PTR_BCS_GS1DATABAR =131; // GS1 DataBar Omnidirectional

const LONG PTR_BCS_GS1DATABAR_E =132; // GS1 DataBar Expanded

const LONG PTR_BCS_GS1DATABAR_S =133; // GS1 DataBar Stacked

Omnidirectional

const LONG PTR_BCS_GS1DATABAR_E_S=134; // GS1 DataBar Expanded Stacked

Page 106: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Appendix Interface for Bizerba RIK weighing modules

100 6.110.95.1.1.022

6.1.5 UPOSlibPageModePrint

/////////////////////////////////////////////////////////////////////

// "PageModePrint" Method: "Control" Parameter Constants (added in 1.9)

/////////////////////////////////////////////////////////////////////

const LONG PTR_PM_PAGE_MODE = 1;

const LONG PTR_PM_PRINT_SAVE = 2;

const LONG PTR_PM_NORMAL = 3;

const LONG PTR_PM_CANCEL = 4;

6.2 Sample Code

6.2.1 Sample for label print package com.bizerba.jpos.PosPrinter;

import jpos.JposException;

import jpos.POSPrinter;

import jpos.POSPrinterConst;

import jpos.POSPrinterControl113;

import jpos.events.DirectIOEvent;

import jpos.events.DirectIOListener;

import jpos.events.ErrorEvent;

import jpos.events.ErrorListener;

import jpos.events.OutputCompleteEvent;

import jpos.events.OutputCompleteListener;

import jpos.events.StatusUpdateEvent;

import jpos.events.StatusUpdateListener;

public class PosPrinterTest implements StatusUpdateListener, OutputCompleteListener,

ErrorListener, DirectIOListener{

public static void main(String[] args) {

PosPrinterTest pT=new PosPrinterTest();

pT.run();

pT=null;

}

public void run() {

try {

/******************************************************/

/* startup service infrastructure */

/******************************************************/

//create the UPOS control object

POSPrinterControl113 prn = (POSPrinterControl113)new POSPrinter();

// Set StatusUpdateEvent listener

prn.addStatusUpdateListener(this);

// Set ErrorEvent listener

prn.addErrorListener(this);

// Set OutputCompleteEvent listener

prn.addOutputCompleteListener(this);

// Set DirectIOEvent listener

prn.addDirectIOListener(this);

/******************************************************/

/* initialize printer */

/* calls from test_data/init_calls/init_printer_1.xml */

/******************************************************/

//open the printer

prn.open("BizerbaPOSPrinter1"/*, pEventCallbacks*/);

//claim the printer

prn.claim(10);

//enable the printer

prn.setDeviceEnabled(true);

//verify success

boolean enabled=prn.getDeviceEnabled();

Page 107: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for Bizerba RIK weighing modules Appendix

6.110.95.1.1.022 101

assert(enabled);

int diodata[]=new int[1];

String diostr[]=new String[1];

//check printer head temperature

diodata[0]=0;

diostr[0]="";

prn.directIO(15, diodata, diostr);

assert(1==diodata[0]);

/***************************************************************/

/* initialize label print */

/* calls from test_data/pretest_calls/pretest_ref001_label.xml */

/***************************************************************/

//select paper with labels

diodata[0]=2;

diostr[0]="";

prn.directIO(19, diodata, diostr);

assert("RETURN:[0] OK"==diostr[0]);

//set reversing distance to 80 dots

diodata[0]=80;

diostr[0]="";

prn.directIO(23, diodata, diostr);

assert("RETURN:[0] OK"==diostr[0]);

//load the layout

diodata[0]=0;

diostr[0]="pretest_calls/ref001_ohne_rev.xml";

prn.directIO(4, diodata, diostr);

assert("RETURN:[0] OK"==diostr[0]);

//get fields from label layout

diodata[0]=0;

diostr[0]="";

prn.directIO(5, diodata, diostr);

String[] fieldlist= diostr[0];

assert("1,31,59,223"==diostr[0]);

//switch to page mode == labelprint mode

prn.pageModePrint(POSPrinterConst.PTR_PM_PAGE_MODE);

//check paperout

boolean paperout=prn.getRecEmpty();

assert(!paperout);

/***************************************************************/

/* push data into label */

/* calls from test_data/test_ref001_label_rev.xml */

/***************************************************************/

// set a bitmap to slot 1

prn.setBitmap(1,0,”pretest_calls/phala.png”,

PTR_BM_ASIS, PTR_BM_CENTER);

for each fieldnumber in fieldlist

{

switch(fieldnumber)

{

case "1": // field is weight

// set weight into label field #1

prn.printNormal(0, "^[1; insert here weight value");

break;

case "31": //field is barcode

// set barcode into label field #31

prn.printNormal(0, "^[31;\033|*30Rs132h000w300a-2t-13d21Test

OKe");

break;

case "59": // header bitmap

// print bitmap from slot 1 to header bitmap field

prn.printNormal(0, "^[59;\033|1B");

break;

case "223": // general textfield

// set text into label field #223

prn.printNormal(0, "^[223;MyText");

Page 108: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Appendix Interface for Bizerba RIK weighing modules

102 6.110.95.1.1.022

break;

default:

// implement all other fields

break;

}

}

boolean print_and_stay_in_label_mode=true;

if( print_and_stay_in_label_mode )

{

// remark: pageModePrint always prints

// PTR_PM_PRINT_SAVE stay in label mode

// PTR_PM_CANCEL leave label mode

/***************************************************************/

/* print label and stay in label-mode for further label print */

/***************************************************************/

prn.pageModePrint(POSPrinterConst.PTR_PM_PRINT_SAVE);

}

else // print and leave label mode

{

/*****************************************/

/* print and uninitialize label print */

/* exit label-mode */

/*****************************************/

prn.pageModePrint(POSPrinterConst.PTR_PM_CANCEL);

/******************************************************/

/* uninitialize printer */

/* calls from test_data/exit_calls/exit.xml */

/******************************************************/

//disable the printer

prn.setDeviceEnabled(false);

//release the printer

prn.release();

//close the printer

prn.close();

}

} catch (JposException e) {

e.printStackTrace();

}

}

@Override

public void errorOccurred(ErrorEvent arg0) {

System.out.print("ErrorEvent occured");

System.out.print(arg0);

}

@Override

public void outputCompleteOccurred(OutputCompleteEvent arg0) {

System.out.print("OutputCompleteEvent occured");

System.out.print(arg0);

}

@Override

public void statusUpdateOccurred(StatusUpdateEvent arg0) {

System.out.print("StatusUpdateEvent occured");

System.out.print(arg0);

}

@Override

public void directIOOccurred(DirectIOEvent arg0) {

System.out.print("DirectIOEvent occured");

System.out.print(arg0);

}

}

6.2.2 Basic functioning of UPOSlib

6.2.3 Use cases Ticket print (fast == without transaction)

Page 109: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Interface for Bizerba RIK weighing modules Appendix

6.110.95.1.1.022 103

Transmitting printing data via API, e.g. PrintNormal, PrintBitmap, PrintBarcode

Ticket print with transaction

Start transaction

Transmitting printing data via API, e.g. PrintNormal, PrintBitmap, PrintBarcode

Stop transaction

Label printout Version 1 (print one layout)

Select layout file via DirectIO (4 == LoadLayout)

Start label printing via PageModePrint(PTR_PM_PAGE_MODE) .

Transmit data with ID sequences via PrintNormal.

PageModePrint (PTR_PM_NORMAL) prints the layout and switches back into ticket mode. Example:

DirectIO(UseBizerbaTextExtensions); DirectIO(LoadLayout =“/home/user1/layouts/layout1.xml”) PageModePrint(PTR_PM_PAGE_MODE) PrintNormal(„…“) PageModePrint(PTR_PM_NORMAL)

Label printout Version 2 (print multiple (modified) copies)

Select layout file via DirectIO (4 == LoadLayout)

Start label printing via PageModePrint(PTR_PM_PAGE_MODE).

Transmit data with ID sequences via PrintNormal.

Printing is started with PageModePrint (PTR_PM_PRINT_SAVE). The layout remains unchanged.

Fields can selectively be re-filled with data.

Printing process can be repeated any time either with PageModePrint (PTR_PM_PRINT_SAVE) to stay in label mode or call PageModePrint (PTR_PM_NORMAL) to print and leave the ticket mode.

Internal printer controlling o Label printout

Load layout into memory Filling fields via API With Print command:

- BLDlib renders a complete label via BOS and transmits it to the printer manager - UPOSlib initiates the printing process and controls the paper infeed/positioning

o Immediate ticket printing Transmitting printing data via API, e.g. PrintNormal, PrintBitmap,

PrintBarcode UPOSlib initiates the printing process and controls the paper

infeed/positioning

Page 110: JPOS / OPOS Interface - TCPOS wikiwiki.tcpos.com/wiki/images/7/71/POSPrinter_API_Description.pdfJPOS / OPOS Interface for RIK Printer Module ... 1.4 Presentation and layout ... 4.2.2

Appendix Interface for Bizerba RIK weighing modules

104 6.110.95.1.1.022

6.3 Logfiles and Tracing Writing logfile to trace what the driver does is available through POSConfig. Please refer to the documentation of POSConfig.