cpcl text limited

I'm using the android SDK (ZSDK_ANDROID_API.jar)

I've a dynamically generated CPCL code. When this code is small (30 lines approx) it gets printed without any issue, but when the CPCL code gets larger the printer starts printing but before finishing the label, it stops printing without finishing the label. No error is reported by the printer nor the SDK.

 

In the attached image you can see the first label (OK) and the second label (NOT FINISHED)

test-simple.cpcl is an example code I'm using.

 

 

Here is the java code I'm using:

 

  String cpclData = "CPCL CODE HERE";

  // Instantiate insecure connection for given Bluetooth MAC Address.

  Connection thePrinterConn = new BluetoothConnectionInsecure(theBtMacAddress);

  // Initialize

  Looper.prepare();

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

  thePrinterConn.open();

  // Send the data to printer as a byte array.

  thePrinterConn.write(cpclData.getBytes());

  // Make sure the data got to the printer before closing the connection

  Thread.sleep(500);

  // Close the insecure connection to release resources.

  thePrinterConn.close();

  Looper.myLooper().quit();

 

 

Any advice would be really appreciated

 

MARTIN

Martin Radosta
Thanks for the replyAttached

Thanks for the reply

Attached a long label

Thanks for any advice you can give me

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Martin,It looks like you

Hi Martin,

It looks like you set the length too short.  If you change line 3 to:

! 0 200 200 4099 1

It prints the whole thing.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Martin Radosta
Thank you very, very much

Thank you very, very much Robin

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Martin, Can you also

Hi Martin, Can you also attach a copy of the longer label that is not printing fully.  I only see the shorter label in your zip file.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments