title: how to format paragraph string to show content left, Right or middle of pdf document using iTextsharp ' vb
body: <p>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.</p>
  
  <p>Thanks</p>
  
  <p>as per suggestion by Bruno Lowagie I am using </p>
  
  <pre><code>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
  </code></pre>
  
  <p>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'</p>