30
To create a graphic print document:
To create a graphic print document, for graphics, store the android.graphics.Bitmap class in the command
buffers with addImage (p.57) of the Builder class.
Use the programming example below for your reference.
For ways of graphic printing, you can also print the graphics registered in the printer's NV memory.
For details, refer to addLogo (p.59).
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
try {
//Initialize a Builder class instance
Builder builder = new Builder("TM-T88V", Builder.MODEL_ANK);
//Create a print document
Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.background);
builder.addImage(bmp, 0, 0, 8, 48, Builder.PARAM_DEFAULT);
builder.addCut(Builder.CUT_FEED);
} catch (EposException e) {
int errStatus = e.getErrorStatus();
}