addText
Adds the printing of text to the command buffer.
After printing text, to print content other than text, execute line feed or paper feed.
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.
Error status
ERR_PARAM
ERR_MEMORY
ERR_FAILURE
Example
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();
}
46
String
\t
\n
\\
Invalid parameter was passed.
Could not allocate memory.
An unspecified error occurred.
Description
Horizontal tab
(HT)
Line feed
(LF)
Carriage return
Description