New Line when printing with CPCL

C Chris Dorman 3 years 6 months ago
111 1 0

I would like to write multiple lines on a printout, but my code is printing them out on top of eachother. I am using CPCL in Android.
 
String cpclData = "! 0 200 200 210 1\r\n"
                                            + "TEXT 5 0 20 10 " + receiptString() + " \r\n" //type, font, size, x position, y position, data
                                            + "FORM\r\n"
                                            + "PRINT\r\n";
 
                                    connection.write(cpclData.getBytes());
 
How can multiple lines be achieved?

Please Register or Login to post a reply

1 Replies

C Chris Dorman

receiptString() returns the String:

"Line 1 \r Line2 \r Line3"

CONTACT
Can’t find what you’re looking for?