46
addText
Adds the printing of text to the command buffer.
Syntax
public void addText(String data) throws EposException
Parameter
data : Specify a character string to be printed.
For the horizontal tab/line feed, use the following escape sequences:
Exceptions
When processing fails, EposException is thrown with one of the following error values.
Example
After printing text, to print content other than text, execute line feed or paper feed.
String Description
\t Horizontal tab(HT)
\n Line feed (LF)
\\ Carriage return
Error status Description
ERR_PARAM Invalid parameter was passed.
ERR_MEMORY Could not allocate memory.
ERR_FAILURE An unspecified error occurred.
To add character strings:
try {
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
builder.addText("Hello,\t");
builder.addText("World!\n");
///Process///
} catch (EposException e) {
int errStatus = e.getErrorStatus();
}