I'm developing a label automating system using itextsharp with C#. I needed to center a selected and it should be goes to a new line if the page width exceeded. Text should be in a given position too. Please help!!!
I tries using paragraphs, chunks and even showtextaligned method. But non of them work.
cb.SetFontAndSize(bfTimes, 5);
cb.SetColorFill(BaseColor.RED);
cb.ShowTextAligned(Element.ALIGN_CENTER,"this is a sample text",50,50,0);
When using paragraphs, text was center aligned but cannot place it in a required position. when using a ShowTextAligned method, text didn't align or move to a new line.