tags:

views:

49

answers:

1

Continuing my post for finding the print service application, I'm really interested in java4less(textprinter). How do I to print one string object with multiple line inside, let's say the string name is out:

AID                     :   000922
A/C Number              :   XXXXXXXXX
A/C Name & Address      :   REKENING ANTARA SHB DGN TOP UP

Is it possible for using some function to put it once? Without I must set it manually:

printer.printString ("AID                     :   000922");
printer.newLine();
printer.printString ("A/C Number              :   XXXXXXXXX");
printer.newLine();
A: 

Try

printer.printString ("AID : 000922\nA/C Number : XXXXXXXXX\n");

The \n at the end should print a newline.

Mark
mark, I put this AID : 000922 \nA/C Number : XXXXXXXXX \nA/C Name I cannot get the desired printing, only first line will be printed.
Mr.K
Hrm... then I dunno. `\n` is the newline character, but I guess `textprinter` doesnt know how to wrap it properly, so it just cuts ot off. Sorry for the useless post, I have no idea.
Mark