writeText(cb, drItem["itemId"].ToString(), left_margin, top_margin, f_cn, 10);
writeText(cb, "LOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOO
NNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNN
GGGGGGGGGGGGG GGGGGGGGGGGGGGGG TEXT, left_margin + 70, top_margin, f_cn, 10);
writeText(cb, drItem["itemDate"].ToString(), left_margin + 300, top_margin, f_cn, 10);
cb.ShowTextAligned(PdfContentByte.ALIGN_RIGHT, drItem["invoicedQuantity"].ToString(), left_margin + 400, top_margin, 0);
writeText(cb, drItem["unit"].ToString(), left_margin + 410, top_margin, f_cn, 10);
cb.ShowTextAligned(PdfContentByte.ALIGN_RIGHT, drItem["price"].ToString(), left_margin + 480, top_margin, 0);
writeText(cb, drItem["currency"].ToString(), left_margin + 490, top_margin, f_cn, 10);
write text method is like:
private void writeText(PdfContentByte cb, string text, int x, int y, BaseFont font, int size)
{
cb.SetFontAndSize(font, size);
cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, text, x, y, 0);
}
but the problem is that "long text" is too long. How can I add break line after 60 characters?
I am using iTextSharp and I have no idea. I try with Chunk
and Phrase
but not working