Print Bitmap Files

The LinePrinter class supports these methods to print bitmap images:

public void writeGraphic(String aGraphicFilePath, int aRotation, aXOffset, aWidth, aHeight)
 throws LinePrinterException
public void writeGraphicBase64(String aBase64Image, int aRotation,
int aXOffset, int aWidth, int aHeight) throws LinePrinterException

The writeGraphic method prints the specified graphic file which must exist on the external storage.

The writeGraphicBase64 method provides an alternative way to print the graphic without using a file. The aBase64Image parameter specifies a string containing Base64 encoded image data to be printed.

The recommended graphic file format is black and white monochrome, either .bmp or .png. The result of other graphic file formats is not guaranteed. The graphic can be rotated and stretched to fit the specified width and height.

The unit of measurement for the aXOffset, aWidth, and aHeight parameters is printhead dots. For information on the printhead supported by your printer, see the printer user manual.