0% found this document useful (0 votes)
170 views21 pages

CBD 2000 Software Reference Manual (CBDSMEN0033)

The document describes software updates made to the CBD2000 chequebook printer. It allows printing using 3 inkjet printers instead of the previous printing solution. It provides details on the positioning and adjustment of the 3 printers as well as new host commands for printing, alignment, and cleaning functions.

Uploaded by

Samer Othman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views21 pages

CBD 2000 Software Reference Manual (CBDSMEN0033)

The document describes software updates made to the CBD2000 chequebook printer. It allows printing using 3 inkjet printers instead of the previous printing solution. It provides details on the positioning and adjustment of the 3 printers as well as new host commands for printing, alignment, and cleaning functions.

Uploaded by

Samer Othman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

CBDSMEN0033 March 05, 2018

Release: 3
SOFTWARE REFERENCE MANUAL page 1/21

CBD 2000

Chequebook Printer

Software Reference Manual

Issued: March 05th, 2018

Release: 3

ROTOTYPE S.p.A. Tel +39 055 8825444


Via F. Bessi, 15 Fax +39 055 8873643
50041 Calenzano [email protected]
(Firenze) Italy www.rototype.com
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 2/21

All rights reserved. No part of this document may be reproduced


or transmitted in any form without written permission by
ROTOTYPE S.p.A.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 3/21

Table of Contents
1 REQUIREMENTS..............................................................................................................4

2 HOST COMMANDS TO CBD2000..................................................................................5

3 PRINTING FUNCTION - DATA TRANSMISSION TO THE PRINTER....................7

4 PRINTING FUNCTION - METHODS OF SUPPORT LIBRARY (TJP.DLL)............9

5 TJP PRINTER FEATURES - PARAMETER DIMENSIONS (TJP BOARD)...........14

6 APPENDIX A - QR CODE TECHNOLOGY WITH ROTOTYPE.............................15

6.1 Code identification.......................................................................................................15


6.1.1 Version.......................................................................................................................15
6.1.2 Zoom factor...............................................................................................................15
6.1.3 Error correction level.................................................................................................16

6.2 Terminology..................................................................................................................16

6.3 QR code capacity..........................................................................................................16

6.4 Printing quality.............................................................................................................17


6.4.1 Paper..........................................................................................................................18
6.4.2 Printing impairments.................................................................................................18

6.5 Reading QR codes........................................................................................................19


6.5.1 Specialised readers....................................................................................................19
6.5.2 Mobile phone.............................................................................................................20
6.5.3 CIS based scanner......................................................................................................20
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 4/21

1 Requirements

The CBD2000 is based on the CBD1000 HT and implements, instead of the previous printing
solution, 3 Inkjet printers. The paper transport speed in the printing area remains of 254mm / s.
The three printers are placed in between the pressure rollers of the current CBD1000 (to
facilitate the upgrade) and has been prepared to print the following heights:

The CBD2000 is based on the CBD1000 HT and implements, instead of the previous printing
solution, 3 Inkjet printers. The paper transport speed in the printing area remains of 254mm / s.
The three printers are placed in between the pressure rollers of the current CBD1000 (to
facilitate the upgrade) and has been prepared to print the following heights:

CBD 2000 Kit (upgraded from CBD1000 with special upgrading kit):

- Printer 1: covering an area of 1/2 inch in the upper part of the document
- Printer 2: covering an area of 1/2 inch in the upper part of the document, with the lowest
pixel aligned to the to highest pixel of Printer 1.

It means these 2 printheads together (fixed one to the other) can cover a total area of 1 inch, in
the upper part of the document. They can be used to print any text or logo in this area of 1 inch
height for the total length of the document.
The assembly of the 2 printheads has 13 mm of manual vertical adjustment, i.e. allowing to
cover 1” area from 47 up to 85 mm (13 + 25.4 mm).
Further the 2 printheads can print in the same area a QR code up to 1 inch size. Using them to
print a smaller QR code, i.e. a QR Code of 16.5 mm you can vary (just by software) the QR
code vertical position within the total area of 1 inch - I.e. in total 9 mm vertical adjustment
allowed inside the 1” area.

- Printer 3: covering an area of 1/2 inch, plus 13 mm manual adjustment allowed, it is


positioned in the lower part of the document: with the lowest pixels positioned from 5 up to 18
mm from the bottom edge.
It is manually adjustable in height to print within an area from 5 mm up to 31 mm, i.e. it can
cover an area from 5 mm up to 17.7 mm when in the lower mechanical position or an area from
18.3 mm up to 31 mm when in the upper mechanical position.
It is able to print any text or logo in this area of 1/2 inch height for the total length of the
document.

New CBD 2000 Native:

Further a new version CBD2000 – native, not upgradable from CBD1000 HT – has fully
manual adjustment of printing height:
- Printer 1 & 2: The assembly of the 2 printheads can be manually adjustable allowing to cover
1” area from 15 up to 85 mm.
- Printer 3: It is manually adjustable in height to print in a 1/2 inch area movable from 5 mm up
to 85 mm.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 5/21

2 Host Commands to CBD2000


The host commands are the same than for the CBD1000, except for the commands related to the
printers:
Mainly: To transmit data to the printers only command “I” remains valid. Command “I” is now
used to transfer to the printers the RBD files and variable bitmaps (see section 1.3).
The commands “J” and “K” and “M”, used on CBD1000, are no more valid for the CBD2000
and refused with error E10.

The Commands A, B, C, D, for the documents production, on CBD2000 have just 2 fields:
<String1> and <Codeline>
The fields <String2> and <String3> related to the printers 2 and 3 are no more present.

OPCODE FUNCTION FORMAT

A Make cheque A<string1>¦<Codeline>¦

B Make last cover B<string1>¦<Codeline>¦

C Make front cover C<string1>¦<Codeline>¦

D Make order form D<string1>¦<Codeline>¦

Warning: document dimensions for CBD2000 must be stated in 2 different places:


– Inside RBD file (see below) and are readable only by TJP printer
– as parameters for all machine functions by commands L and H (same as CBD1000)

For testing purpose new commands FA, FB, FC, FD have been introduced:
They allow to feed one of the 4 kinds of documents (with or without MICR encoding)
without any data for the printers:

OPCODE FUNCTION FORMAT

FA Make cheque FA¦<Codeline>¦

FB Make last cover FB¦<Codeline>¦

FC Make front cover FC¦<Codeline>¦

FD Make order form FD¦<Codeline>¦


CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 6/21

A new command “XJC” has been instead introduced to handle the Ink-Jet print-heads cleaning
(spitting cycle). It is suggested to command a spitting cycle after 4 hours the machine is on
stand by without any printing.

Two new offset parameters have been introduced to allow an alignment correction between the
first 2 printers (for combined use). The 2 related commands are:
XOO for horizontal adjustment
XOV for vertical adjustment (Not active – reserved for future implementations)
Default value is “7” for both [range: from 1 to 15].
For XOO: increment of one unit moves the printing of 2nd printer (upper one) to the left of
1/300” (= 0.85 mm)

The present setting can be checked, as for CBD1000, with order @M, as for following example:
@M
XOH0 XOM0 XOL0 XOS0 XOB0 XOF0 XOT0 XOR10 XOC5 XOO7 XOV7

A new Option setting <Option “Z”> has been introduced to take in account the different
position of the 3rd printer in different machine versions:
OZN -> distance between 1st and 3rd printer = 93,15 mm (CBD2000 Upgrading Kit)
OZY -> distance between 1st and 3rd printer = 99,35 mm (new CBD2000 - native)
By default, this option is disabled (OZN)

The present "Options" setting can be checked with order @F, as for following example:
@F
OAY OBN OCN ODN OGN OIY OLN OMN OPN OQY ORY OUY OVN OXN OZN
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 7/21

3 Printing function - Data transmission to the Printer


Data to the printer are sent using the previous commands (CBD1000) suitably modified .
The need to send a considerably greater amount of data to printers, the use of UNICODE
format, and the need to transfer the data as text to comply with the communication protocol of
CBD1000, led us to decide to encrypt data intended for the printer in BASE64 format.
Each transfer of data to the printer is terminated by "." character (ASCII 2EH), that is not part of
the character set, and it is prefixed by a two-letter code that describes the type of data that
follows:

PREFIX PAYLOAD
BV Variable bitmap
BC barcode
BD bold
RB RBD Descriptor

RBD file is the booklet page template that can be generated with Rotodraw software -
Please refer to CJD 3000 service manual for an overview on Rotodraw and its usage.
The RBD file is always needed and up to 3 variable bitmaps per booklet can be added..
The TJP.DLL automatically transform RBD file as generated by Rotodraw into Base64 format,
see chapter 4 (function EndInit takes RBD file in input and performs this action)

RYB file is a proprietary image format, the support library TJP.DLL automatically creates
this format, see chapter 4 :
- function LoadInitBitmap, followed by function EndInit, takes a bitmap as an input and
generates RYB file already encoded in Base64 format (to send by using command “I”)
– function LoadDocumentBarcode, followed by EndDocument, takes a barcode text and
parameters, and generates the barcode as a bitmap in RYB format already encoded in Base64
format (to send inside command “A”)

BLD file contains the page variable text; TJP.DLL supports generating this format, see
chapter 4 (function LoadDocumentField, repeatedly called for each variable text field in the
page, followed by EndDocument function generates the BLD file already encoded in Base64.
BLD file is always needed even if no variable fields are filled in, one optional barcode image
can be added.

The encoding of the data in BASE64 and the addition of the terminator (ASCII 2EH) is handled
by the tjp.dll library.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 8/21

The RBD file and the variable bitmaps can be sent before the commands for documents
production (commands A, B, C, D) by the command “I” that on CBD1000 sends a string to the
first printer.

OPCODE FUNCTION FORMAT


I Send a string to printer 1 I<string>¦

For example the commands:

IBV<file RYB in BASE64>.BV<file RYB in BASE64>.RB<File RBD in BASE64>.¦


sends to the printer 2 variable bitmaps and the RBD file

IRB<File RBD in BASE64>.¦


sends to the printer just the RBD file

The RYB file for barcode and the BLD file can be sent by the current commands (CBD1000)
for documents production (of course without the strings for printers 2 and 3):
Inside the DDO, the decoding of the command, and the data transmission to the printer is
possible when a frame of data is available. Frames are prepared by the command interpreter
starting from the command A, B, C, D. When resources permit, a frame is associated with a
thread of execution and production of the document can begin.

The <string1> inside commands A, B, C, D will be sent to the printer TJP.

For example, here is the command for one cheque:

ABD<file BLD in BASE64>.BC<file RYB in BASE64>.¦<Codeline>¦

Warning: BLD file must always be the first command in the string!

The type of document, together with the association of the marks, the thresholds for the
thickness control, and the feeder from which the document is taken, is determined by the
CBD1000 command A, B, C or D.
The document that will be printed by the printer is instead the one contained in the BOLD file
(BLD), which may reflect one of the four types encoded by the CBD1000.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 9/21

4 Printing function - Methods of support library (tjp.dll)


The support library provides only the strings to be inserted inside the CBD2000 commands:
“I” & “A”, “B”, “C”, “D”.
It contains no help for the handling of communications or flow management.
The upload of the RBD file and volatile bitmaps (printer initialization) is performed before
starting the documents production by the command “I”, similar to how the printers were
initialized on CBD1000, it must be inserted after the command opcode and before the
terminator: “I <string> |”.

Initialization:
the initialization to define the type of barcode that may be used is made by the
method SetBarcode().

The CBD2000 needs to know the size of the documents to process (see commands “L” and
“H”), but also in the RBD file is present the size of the document and the two settings must be
in agreement.
For this purpose it has been added the method
GetDimensions() which extracts size of the document from the RBD file.

The data string to initialize the printer is obtained by the following sequence of methods:
1. StartInit()
2. LoadInitBitmap()
3. EndInit()

The function “LoadInitBitmap()” may be absent, or repeated up to three times, to define zero or
more variable bitmaps.
The Id of the bitmap will always be different and correspond to a volatile bitmap file defined in
the RBD file.
The function “EndInit” requires the RBD file and returns the requested data string to send with
command “I”.

Similarly for the commands that control of the documents production “A”, “B”, “C”, “D”:
The string must be inserted in place of the data to the printer, for example:
“A <string> | <codeline> |”

The string for the printer is obtained by the following sequence of methods:
1. StartDocument()
2. LoadDocumentField()
3. LoadDocumentBarcode()
4. EndDocument()

The function “LoadDocumentField()” must be repeated for each variable field to be defined,
i.e. that has been defined in the RBD file to which the BOLD refers.
The function “LoadDocumentBarcode()”, instead, can be present only once and must
correspond to a variable bitmap field that must always be present in the RBD file.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 10/21

SetBarcode
This method defines the bar-code encoder behaviour.
HRESULT WINAPI SetBarcode(
BYTE *barcodedef
);
Parameters
barcodedef The length of this array is depending on the encoder type.
Barcodedef[0] Selects the encoder type, It must be 1 (QR encoder).
Barcodedef[1] Set the correction level. Range from 0 to 3. (zero is the lowest).
Barcodedef[2] Set the QR code version. Range from 1 to 15 (zero is the
smaller).
Barcodedef[3] Set the encode mode. It must be 2 (8 bit data).
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.

StartInit
This method starts the printer initialization string creation. It clears all the loaded bitmaps.
HRESULT WINAPI StartInit(void);

Parameters
none
Return value
Zero

LoadInitBitmap

This method loads a volatile bitmap in the initialization string.


HRESULT WINAPI LoadInitBitmap(
LPWSTR lpBmpFilename,
UINT uId
);

Parameters
LpBmpFilename The file name of the windows bitmap file. The string is Null-terminated.
uId Id of the volatile bitmap. Range from 1 to 4 for a maximum of 3 bitmaps.
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 11/21

EndInit
TThis method returns the printer initialization string.
HRESULT WINAPI EndInit(
LPWSTR lpRbdFilename,
LPSTR lpBuffer,
UINT uSize
);
Parameters
LpRbdFilename The file name of the RBD file. The string is Null-terminated.
lpBuffer A pointer to the buffer to receive the printer init string.
uSize The maximum size of the buffer in TCHARs. The buffer length must include
room for a terminating null character.
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.

StartDocument
This method starts the document printer string creation. It clears the loaded bar-code.
HRESULT WINAPI StartDocument(void);

Parameters
none
Return value
Zero

LoadDocumentField
This method loads a variable field in the printer data.
HRESULT WINAPI LoadDocumentField(
LPWSTR lpField,
UINT uId
);
Parameters
LpField The value of the field. The string is Null-terminated.
uId Id of the field as numbered in the RBD file (Range 1 - 8)
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 12/21

LoadDocumentBarcode
Load a barcode in the printer data.
HRESULT WINAPI LoadDocumentBarcode(
LPWSTR lpBarcodeData,
UINT uId,
UINT uZoom
);
Parameters
lpBarcodeData Data for the barcode. The length and the allowed character are encoder
dependent.
uId Id of the volatile bitmap. Range from 1 to 4, only one barcode is allowed.
uZoom The zoom factor for the bar-code. Range from 3 to 5.
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.

Please note: if the barcode does not fit the printing area will be entirely skipped.

EndDocument
This method generates the printer data.
HRESULT WINAPI EndDocument(
TCHAR wDocType,
LPSTR lpBuffer,
UINT uSize
);

Parameters
wDocType The type of the document:
“A” cheque
“B” last cover
“C” front cover
“D” order form (if different document are defined in the RBD file, use this
document anyway).
lpBuffer A pointer to the buffer to receive the printer string.
uSize The maximum size of the buffer in TCHARs. The buffer length must
include room for a terminating null character.
Return value
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 13/21

GetDimensions
This method reads the cheque size embedded in RBD files.
HRESULT WINAPI GetDimensions(
LPWSTR lpRbdFilename,
LPDWORD lpWidth,
LPDWORD lpHeight
);

Parameters
lpRbdFilename The file name of the RBD file. The string is Null-terminated.
lpWidth A pointer to the buffer to receive the document width in tenth of a
millimeter.
lpHeight A pointer to the buffer to receive the document height in tenth of a
millimeter.
Return value
If the function succeeds, the return value is zero and the values pointed by lpWidth and
lpHeight are assigned.
If the function fails, the return value is the error code.

ErrorCodes
Error Mnemonic Description
Codes
0 TJP_SUCCESS The function succeeded.
(-1) TJP_ERROF_MEMORY Memory allocation failure.
(-2) TJP_ERR_INVALID_BUFFER The buffer pointer does not point to accessible memory or
the size of the buffer is invalid for the operation.
(-3) TJP_ERR_INVALID_VALUE A parameter value is out of range.
(-4) TJP_ERR_INTERNAL_ERROR An internal inconsistency occurred.
(-5) TJP_ERR_OPEN_FILE_ERROR An error was occurred while opening a file.
(-6) TJP_ERR_INVALID_BC_DEF The bar-code definition is invalid.
(-7) TJP_ERR_BC_CREATION An error was occurred while creating the required bitmap.
(-8) TJP_ERR_LOAD_BMP The bitmap cannot be imported.
(-9) TJP_ERR_SAVE_RYG The bitmap cannot be converted to the internal format.
(-10) TJP_ERR_FILE_SIZE A file cannot be processed due to the printer constraints.
(-11) TJP_ERR_ENC_LOAD BASE64 encoder failed while loading a file.
(-12) TJP_ERR_ENC_CONV BASE64 encoder failed.
(-13) TJP_ERR_ENC_SAVE BASE64 encoder failed while saving a file.
(-14) TJP_ERR_SIZE_BMP Bitmap size exceeded the printer constraints.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 14/21

5 TJP Printer features - Parameter dimensions (TJP board)

Maximum Printable extension: 9.5 inches


Max size RBD file : 3072 bytes
Max size BOLD file: 3072 bytes
Max size of text line in characters: 200
Max number of variable text fields: 8
Max number of volatile bitmaps (except barcode): 3
Max size single volatile bitmap: 3072 bytes
Max size 2D barcode object (module 1): 1024 bytes
Max extension cumulative permanent resources: 589 824 bytes
Max size single resource (compressed): 130872 bytes
Max height of the font characters: 150 points
Max height printable bitmap: 150 points
Max width printable bitmap: 2850 points
Max number of permanent fonts: 16
Max number of permanent bitmaps: 16
Paper transport speed at printing area: 254 mm / s
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 15/21

6 APPENDIX A - QR code technology with Rototype

QR codes are a specific 2D barcodes that have the capability to store a large
amount of information in a small footprint size. This small paper walks you
through the most important topics for mastering the technology with the
highest proficiency for practical applications

6.1 Code identification


From a practical point of view the interesting parameter of a QR code is its capacity, i.e. the
amount of information that can be stored inside the QR code. The amount of information is
measured in bytes (8 bit). A byte corresponds to a single character of the ASCII character
set. If country specific characters need to be used (such as the latin “è” or the persian
Tcheh “‫ )”چ‬usually UTF-8 encoding is adopted. UTF-8 encodes the 128 ASCII characters as
one byte and most of the other characters and symbols in 2 or 3 bytes (some rare
characters require 4 bytes). In order to know how many bytes a character will take there
are handy online tools such as https://mothereff.in/utf-8. Rototype APIs take care
automatically of UTF-8 encoding.
There is a possibility to use a numeric mode that only encodes numeric digits (0 to 9) and
an alphanumeric mode that encodes numeric digits and English uppercase letters (A to Z):
these modes might be useful for specific applications but are not discussed here.
A QR code is identified by 3 parameters described in the following paragraphs.

6.1.1 Version
The version ranging from 1 to 40 determines the “size of the QR code” that is how
many “small squares” are present in the QR code. This small black or white
squares are called “modules”. The version by itself does not imply a specific
dimension because the module size itself is variable according to a zoom factor.

module

6.1.2 Zoom factor


The zoom factor combined with the version decides the size of the QR code. The zoom factor is
the number of pixels on a side of a module. That is we define a zoom 4 if the module is 4x4
pixels.
We are referring in the following to a 300 dpi printer which is an assumption based on Rototype
printer machines and a reasonable general assumption. For a different resolution device the
opportune scaling is required. There is a practical limit at 300 dpi: the minimum applicable
zoom is 4. It is best to use at least a zoom of 5 and of course, according to the application, there
is no upper limit.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 16/21

6.1.3 Error correction level


There are 4 levels of error correction; including more error correction information you reduce
the capacity of QR code but you improve its resiliency to damage, i.e. the code can still be
readable if portions of it are damaged.

Error Correction Level Error Correction Capability

L Recovers 7% of data

M Recovers 15% of data

Q Recovers 25% of data

H Recovers 30% of data

6.2 Terminology
The following image reports some more terminology.

6.3 QR code capacity


It is possible to know the physical size of the QR code by combining the version and zoom
factor (assuming 300 dpi printer resolution). Adding the error correction level it is possible to
compute the amount of bytes that the QR code can contain.
All this information is collected in a table for handy reference.
The table has been limited to codes that fit in 1 inch.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 17/21

Version Zoom 4 Zoom 5 Zoom 6 Correction Correction Correction Correction


(number of size (mm) size (mm) size (mm) L capacity M capacity Q capacity H capacity
modules) (bytes) (bytes) (bytes) (bytes)
1 (21x21) 7 9 11 17 14 11 7
2 (25x25) 8 11 13 32 26 20 14
3 (29x29) 10 12 15 53 42 32 24
4 (33x33) 11 14 17 78 62 46 34
5 (37x37) 13 16 19 106 84 60 44
6 (41x41) 14 17 21 134 106 74 58
7 (45x45) 15 19 23 154 122 86 64
8 (49x49) 17 21 25 192 152 108 84
9 (53x53) 18 22 230 180 130 98
10 (57x57) 19 24 271 213 151 119
11 (61x61) 21 321 251 177 137
12 (65x65) 22 367 287 203 125
13 (69x69) 23 425 331 241 177
14 (73x73) 25 458 362 258 194

The following comparison of a 367 byte English text and a version 12, correction L, zoom 4 QR
code that contains it show how dense the information can be (489 bytes per square inch).
Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Integer commodo augue libero, et
rutrum leo suscipit non. Cras fringilla nunc mi, et
sollicitudin lacus vestibulum eget. Ut volutpat id
leo in lobortis. Nulla egestas arcu non ante
vehicula, quis laoreet odio finibus. Proin ultrices
fermentum ipsum, sed convallis massa. Quisque
hendrerit nulla metus, ac amet.

From this paragraph it is evident that choosing the QR code format is a compromise between
the required density of information and the resiliency. A denser QR code is more difficult to
read and more sensitive to damage. If you need a very dense code you have to make sure that
the printing quality and the reading technology are both up to the expectations.

6.4 Printing quality


Several factors affect printing quality. The most important factors may seem trivial but are
important and very difficult to handle due to the physical nature of the printing process: we are
referring of course to the combination of printing technology, printing ink and paper. The
printing technology can be Laser or Inkjet. Both technologies are equally good today but
different types of paper are optimal for laser or inkjet printing. In the inkjet camp, moreover,
there are different types of ink with different physical properties (mainly the dye and the
pigment that can also be combined in different proportions in the same ink).
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 18/21

6.4.1 Paper
Paper for inkjet printing shall have a very controlled water absorption rate. If absorption rate is
too low, ink spreads on the surface and does not dry fast enough, if absorption rate is too high,
this is not a problem by itself but it becomes a problem if ink tends to spread inside the paper
fibers creating blurry images.

6.4.2 Printing impairments


From: http://www.qrcode.com/en/howto/trouble.html
When a QR Code is enlarged or made smaller using an image processing tool or the like, every
module becomes distorted. It may look like a normal QR Code, but it may be difficult or
impossible to read the code. The QR code is very sensitive to geometry and therefore if printer
paper transport or scanner create a distortion of geometry the code can be damaged even if high
level of error correction is adopted. Put special care also at digital processing of images after
scanning and if possible read QR codes with a dedicated reader.

If letters or pictures are placed around a QR Code, the required margin cannot be secured.
This kind of code is difficult or impossible to read. The QR code shall always be printed on a
white or very light colored background and a free space around it shall be guaranteed. There is
no precise guideline of how wide the white space shall be and it depends on reader technology
but keeping a reasonable amount of white space around is absolutely a must.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 19/21

If you place letters or pictures on an area overlapping a QR Code, the contrast between the
bright and dark areas becomes indistinct. This kind of code is difficult or impossible to read.

6.5 Reading QR codes


Reading a large QR code is not an issue but a very dense one might be challenging.
The main technologies that can be used to read a QR code are listed below together with a list of
best products that we have selected after a lot of testing in each category.

6.5.1 Specialised readers


Dedicated scanners are certainly the best option for fast and reliable barcode reading. They are
based on imaging cameras and firmware so the technology is similar to the one of a mobile
phone but the specialised hardware and firmware makes the recognition much faster (in
particular the focus technology, free from constraints coming from the necessity to also be able
to take selfies). We have tested succesfully the most recent Zebra DS 457 which is also shown
in the picture (precise part number: DS 457-SR20004ZZWW that is the latest update) but the
model should be chosen based on application. Zebra, ex Motorola, is one of the companies with
best reputation and wider product catalog.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 20/21

6.5.2 Mobile phone


Mobile phone have driven the diffusion of QR codes and it’s no surprise that they are now quite
good readers. But not all Apps have the same performance.
We have identified as the best scoring application:
“Barcode Scanner” for Android platform and published by Zxing Team. This application is
based on the same Zxing library that we recommend for PC usage.
The phone hardware is also very important, the camera resolution and capability of fast focus
being the most important parameter. It is important to know that the relevant resolution is not
the one usually expressed in Mpixel for picture but the video resolution because the reader
application uses the camera in video mode. The resolution shall be at least 720p whereas 1080p
(full HD) is best.

6.5.3 CIS based scanner


There are desk products, namely flat bed scanners or moving paper scanners.

There are also specific scanners for cheque processing.

For CIS based scanners the relevant parameter is the resolution normally expressed in dots per
inch or dpi.
It is recommended a resolution of at least 300 dpi. Also it is required to print QR code with at
least zoom 5.
QR code with zoom 4 can be readable at 300 dpi but with some difficulties. In case of zoom 4 it
should be preferable a resolution at 600 dpi.
Finally, in case of scanner resolution of 200 dpi the QR code should be at least zoom 6.

The software is also very important for the performance. Rototype uses Zxing library for PC
based decoding as being the most effective at several tests but often a CIS based image requires
preprocessing to achieve best results. Preprocessing might include brightness and contrast
adaptations, blur, resize with different interpolation mechanisms depending on the
characteristics of the original image.
CBDSMEN0033 March 05, 2018
Release: 3
SOFTWARE REFERENCE MANUAL page 21/21

6.5.3.1 CIS based scanner test results

For experimental proof we have used the following QR code:

This one below is a 300 dpi scanned QR code printed by CBD with zoom 4.

The one below is the same QR code scanned at 150 dpi; the visual quality is unacceptable. This
specific code is readable but the dependability is not acceptable. The same can be stated for 200
dpi which is even worse because it is not an integer submultiple of the 300 dpi resolution used
at printing time.

You might also like