zebra zq500 Android: Prints with large space

Hello,

I am on an Android project to print a label contains images and text.

I managed to print both but the problems that are printed with a large space at the beginning and between the two elements.

You have an idea to allow me to print without space please. Thank you.

here is the sample code used:

public static int TestZebra(final String theBtMacAddress, String sCodeZPL, String LogoimagePath, String DriverSignatureimagePath){

final String pageDescriptionLanguage = "zpl";

int Resultat = 0;

BluetoothConnection thePrinterConn = new BluetoothConnectionInsecure(theBtMacAddress);

try {

// Open the connection - physical connection is established here.

thePrinterConn.open();

ZebraPrinter printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, thePrinterConn);

int labelCount = Integer.parseInt(SGD.GET("odometer.total_label_count", thePrinterConn));

String zplData = sCodeZPL;

int x = 0;

int y = 0;

//zplData =

// ^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR5,5~SD10^JUS^LRN^CI0^XZ

// ^XA

// ^MMT

// ^PW575

// ^LL0100

// ^LS0

// ^FT476,37^A0I,54,117^FH\^FDHello Test^FS

// ^PQ1,0,1,Y^XZ

if (DriverSignatureimagePath != "")

{

printer.printImage(DriverSignatureimagePath, 0, 0, 200, 200 , false);

}

thePrinterConn.write(zplData.getBytes());

int newLabelCount = Integer.parseInt(SGD.GET("odometer.total_label_count", thePrinterConn));

if (labelCount + 1 == newLabelCount)

{

System.out.println("Print Successful.");

Toast.makeText(getApplicationContext (),"Print Successful.",Toast.LENGTH_SHORT).show();

Resultat = 1;

}

//else reprint?

else

{

System.out.println("Print NOT Successful.");

Toast.makeText(getApplicationContext (),"Print NOT Successful.",Toast.LENGTH_SHORT).show();

Resultat = 0;

}

} catch (Exception e) {

// Handle communications error here.

e.printStackTrace();

}finally {

try {

// Close the connection to release resources.

thePrinterConn.close();

} catch (ConnectionException ec) {

// Handle connection close error here.

ec.printStackTrace();

}

}

return Resultat;

}