I'm using iText and Java to modify pdf-document. When I try to write a string with new line characters inside, in pdf it is shown in only one line.
Here is some code I use,
static PdfContentByte cb;
cb = writer.getDirectContent();
.
.
.
cb.setTextMatrix(48, 285);
cb.showText(str);
but str appears in a single line.
How to add newline in iText?