EasyManuals Logo
Home>Citizen>Printer>CL-S521

Citizen CL-S521 Programming Manual

Citizen CL-S521
95 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #10 background imageLoading...
Page #10 background image
CITIZEN Android Label Print SDK Programming Manual
10
1.4. Program structure
Here is an example program in Java which uses the SDK.
// Create an instance( LabelDesign class )
LabelDesign design = new LabelDesign();
// Text
design.drawTextPtrFont("Sample Print",
LabelConst.CLS_LOCALE_JP, LabelConst.CLS_PRT_FNT_TRIUMVIRATE_B,
LabelConst.CLS_RT_NORMAL, 1, 1, LabelConst.CLS_PRT_FNT_SIZE_24, 20,
300);
// QRCode
design.drawQRCode("DrawQRCode",
LabelConst.CLS_ENC_CDPG_US_ASCII, LabelConst.CLS_RT_NORMAL, 4,
LabelConst.CLS_QRCODE_EC_LEVEL_H, 20, 220);
// Rect(fill)
design.fillRect(20, 150, 350, 40, LabelConst.CLS_SHADED_PTN_11);
// BarCode
design.drawBarCode("0123456789",
LabelConst.CLS_BCS_CODE128, LabelConst.CLS_RT_NORMAL,
3, 3, 30, 20, 70, LabelConst.CLS_BCS_TEXT_SHOW);
// Create an instance( LabelPrinter class )
LabelPrinter printer = new LabelPrinter();
// Connect printer
int result = printer.connect(LabelConst.CLS_PORT_WiFi,
"192.168.128.212")
if (LabelConst.CLS_SUCCESS == result)
{
// Get Properties
int printDarkness = printer.getPrintDarkness();
if (LabelConst.CLS_PROPERTY_DEFAULT == printDarkness)
{
// Set Properties
printer.setPrintDarkness(10);
}
// Print Label
result = printer.print(design, 0001);
// Disconnect
printer.disconnect();
if (LabelConst.CLS_SUCCESS != result)
{
// Print Error
Toast.makeText(MainActivity.this, "Print Error :" +
Integer.toString(result), Toast.LENGTH_LONG ).show();
}
}
else
{
// Connect Error
Toast.makeText(MainActivity.this, "Connect or Printer Error :" +
Integer.toString(result), Toast.LENGTH_LONG ).show();
}
Design of the
label
Print of the
label
(Connect,
Print,
Disconnect)

Table of Contents

Other manuals for Citizen CL-S521

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Citizen CL-S521 and is the answer not in the manual?

Citizen CL-S521 Specifications

General IconGeneral
Print technologyDirect thermal
Maximum resolution203 DPI
PC connectedYes
Standard interfacesUSB 1.1, Serial
Optional connectivityEthernet, Serial (RS-232)
USB 1.1 ports quantity1
Connectivity technologyWired
Flash memory4 MB
Internal memory16 MB
Compatible operating systemsWindows 7/XP/2003/2008/Vista
Form factorDesktop
Core diameter25 mm
Media thickness0.0635 - 0.254 mm
Maximum media length1625.6 mm
Maximum roll diameter125 mm
Supported paper width12.5 - 118.1 mm
Media thickness (imperial)0.0025 - 0.01 \
Supported paper width (imperial)0.50 - 4.65 \
Product colorGray
Housing materialMetal, Plastic
Weight and Dimensions IconWeight and Dimensions
Depth289 mm
Width231 mm
Height183 mm
Weight3600 g

Related product manuals