39
Chapter 4 API Reference
4
API Reference
This chapter describes the APIs provided in the ePOS-Print SDK for Android.
ePOS-Print API
The ePOS-Print APIs are APIs for creating and printing print documents. The following classes are available.
❏ Builder class (p. 39)
❏ Print class (p. 40)
❏ EposException class (p. 40)
Builder class
This class creates print documents for printer control commands such as character strings to print, graphic
printing, and paper cutting. The following APIs are available.
The APIs that you can use and the settings that you can designate vary based on the printer.
For details, refer to Printer specifications (p.115).
API Description Page
Constructor Initialize a Builder class instance. 41
Clearing
command buffers
clearCommandBuffer Clears the command buffers added by APIs. 42
Text
addTextAlign Adds a tag for the text alignment setting. 43
addTextLineSpace Adds a tag for the line feed space setting. 44
addTextRotate Adds a tag for the text rotation setting. 45
addText Adds a tag for printing text. 46
addTextLang Adds a tag for the target language setting. 47
addTextFont Adds a tag for the text font setting. 48
addTextSmooth Adds a tag for the text smoothing setting. 49
addTextDouble
Adds a tag for specifying the double-sized text
setting.
50
addTextSize Adds a tag for the text scale setting. 51
addTextStyle Adds a tag for the text style setting. 52
addTextPosition
Adds a tag for specifying the print position of
text.
54
Paper Feed
addFeedUnit Adds a tag for paper feeding (in dots). 55
addFeedLine Adds a tag for paper feeding (in lines). 56
Graphic
addImage Adds a tag for a raster image to be printed. 57
addLogo Adds a tag for an NV logo to be printed. 59
Barcode
addBarcode Adds a tag for a bar code to be printed. 60
addSymbol Adds a tag for a 2D-Code to be printed. 65