EasyManua.ls Logo

Epson TM T88V - Transmission of Print Document

Epson TM T88V
122 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
Loading...
32
Transmission of Print Document
Send a print document using the Print class (p.40). Create a Print class using the constructor for it, use
sendData to specify the Builder class instance that stores the command buffers for the print document, and
send the document. Use the programming example below for your reference.
//Initialize a Print class instance
Print printer = new Print();
int[] status = new int[1];
status[0] = 0;
try {
//Initialize a Builder class instance
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
//Create a print document
//<The page mode starts>
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_UNSPECIFIED);
//<Specify the print data>
builder.addText("Hello,\t");
builder.addText("World!\n");
builder.addCut(Builder.CUT_FEED);
//Send a print document
//<Start communication with the printer>
printer.openPrinter(Print.DEVTYPE_TCP, "192.168.192.168");
//<Send data>
printer.sendData(builder, 10000, status);
//<End communication with the printer>
printer.closePrinter();
} catch (EposException e) {
int errStatus = e.getErrorStatus();
status[0] = e.getPrinterStatus();
printer.closePrinter();
}

Table of Contents

Other manuals for Epson TM T88V

Related product manuals