Print Document Creation - Epson TM-T88V User Manual

Epos-print sdk for android
Hide thumbs Also See for TM-T88V:
Table of Contents

Advertisement

Print Document Creation

Create a print document using the
Create a Builder class using the constructor for it and create a print document using APIs of the Builder
class. Use the programming example below for your reference.
try {
//Initialize a Builder class instance
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
//Create a print document
builder.addTextLang(Builder.LANG_EN);
builder.addTextSmooth(Builder.TRUE);
builder.addTextFont(Builder.FONT_A);
builder.addTextSize(3, 3);
builder.addText("Hello,\t");
builder.addText("World!\n");
builder.addCut(Builder.CUT_FEED);
} catch (EposException e) {
int errStatus = e.getErrorStatus();
}
To create a text print document:
To create a text print document, using APIs for text, store the font settings in command buffers to create a
print document. Use the programming example below for your reference.
For the string "Hello, World!", to create a print document based on the following settings:
 Font:
FontA
 Scale:
x 4 (horizontal) and x 4 (vertical)
 Style:
Bold
try {
//Initialize a Builder class instance
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
//Create a print document
//<Configure the print character settings>
builder.addTextLang(Builder.LANG_EN);
builder.addTextSmooth(Builder.TRUE);
builder.addTextFont(Builder.FONT_A);
builder.addTextSize(4, 4);
builder.addTextStyle(Builder.FALSE, Builder.FALSE, Builder.TRUE, Builder.PARAM_UNSPECIFIE
//<Specify the print data>
builder.addText("Hello,\t");
builder.addText("World!\n");
builder.addCut(Builder.CUT_FEED);
} catch (EposException e) {
int errStatus = e.getErrorStatus();
}
(p.39). 
Builder class
Chapter 3 Programming Guide
3
29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm-t70Tm-p60Tm-u220

Table of Contents