I was able to print to a Zebra RW 420 printer, but I do not know how to format the texts, I looked at the documentation to send the data to the printer, and I noticed the following:
String cpclData = "! 0 200 200 210 1\r\n"
+ "TEXT 4 0 30 40 This is a CPCL test.\r\n"
+ "FORM\r\n"
+ "PRINT\r\n";
This short excerpt makes the text larger, different font and bold, meant only to leave a margin of the text on the left and right side, as it is too much on the margin, and if possible, change the font and break a line, split a paragraph well.
Another thing I noticed, the print does not accept special characters, type ç Â Ã etc and seems to be ASC, am I correct?
I used ZebraDesigner2 and did the procedure to get this script and made my adaptation:
The DEFAULT:
! 0 200 200 406 1
PW 609
TONE 0
SPEED 3
ON-FEED IGNORE
NO-PACE
BAR-SENSE
PCX 40 102
T 5 0 40 301 Negrito
T 5 0 40 240 Negrito
T 2 0 39 331 AUXILIAR 01
T 2 0 39 331 AUXILIAR 02
T 2 0 39 331 AUXILIAR 03
T 2 0 39 331 AUXILIAR 04
T 5 0 40 271 Negrito
T 5 0 40 62 Negrito
T 5 0 40 210 Negrito
T 5 0 40 32 Negrito
PRINT
And with my formatting:
String texto = "! 0 200 200 406 1\r\n"
+ "PW 609\r\n"
+ "TONE 0\r\n"
+ "SPEED 3\r\n"
+ "ON-FEED IGNORE\r\n"
+ "NO-PACE\r\n"
+ "BAR-SENSE\r\n"
+ "PCX 40 102\r\n"
+ "T 5 0 40 301 " + notificacaoText.get(0) +"\r\n" //Negrito
+ "T 5 0 40 240 " + notificacaoText.get(1) +"\r\n" //Negrito
+ "T 2 0 39 331 " + notificacaoText.get(2) +"\r\n" //AUXILIAR
+ "T 2 0 39 331 " + notificacaoText.get(3) +"\r\n" //AUXILIAR
+ "T 2 0 39 331 " + notificacaoText.get(4) +"\r\n" //AUXILIAR
+ "T 2 0 39 331 " + notificacaoText.get(5) +"\r\n" //AUXILIAR
+ "T 2 0 39 331 " + notificacaoText.get(6) +"\r\n" //AUXILIAR
+ "T 2 0 39 331 " + notificacaoText.get(7) +"\r\n" //AUXILIAR
+ "T 5 0 40 271 " + notificacaoText.get(8) +"\r\n" //Negrito
+ "T 5 0 40 62 " + notificacaoText.get(9) +"\r\n" //Negrito
+ "T 5 0 40 210 " + notificacaoText.get(10) +"\r\n" //Negrito
+ "T 5 0 40 32 " + notificacaoText.get(11) +"\r\n" //Negrito
+ "PRINT\r\n";
However, the following error appears when trying to print:
Could not find class 'com.zebra.sdk.util.internal.StringUtilities$1', referenced from method com.zebra.sdk.util.internal.StringUtilities.convertKeyValueJsonToMap