how to format paragraph string to show content left, Right or middle of pdf document using iTextsharp in visual basic and absolute position on the document.
Thanks
as per suggestion by Bruno Lowagie I am using
Dim table As New PdfPTable(3)
table.setWidthPercentage(100)
table.addCell(getCell("Text to the left", PdfPCell.ALIGN_LEFT))
table.addCell(getCell("Text in the middle", PdfPCell.ALIGN_CENTER))
table.addCell(getCell("Text to the right", PdfPCell.ALIGN_RIGHT))
document.add(table)
Public Function getCell(ByVal text As String, ByVal alignment As Integer) As PdfPCell
Dim cell As New PdfPCell(New Phrase(text))
cell.setPadding(0)
cell.setHorizontalAlignment(alignment)
cell.setBorder(PdfPCell.NO_BORDER)
Return cell
End Function
I am getting error cell.setPadding, cell.setHorizontalAlignment,cell.setBorder all are notmember of iTextsharp.Text.pdf.PdfPCell also table.setWidthPercentage(100) shows error argument not specified parameter 'page size'