title: pdf table using itextsharp I want to print field name like 1column name[field name] and second column value of [name] field
body: <pre><code>FileStream fs = new FileStream("abc.pdf", FileMode.Create, FileAccess.Write, FileShare.None);
  Document doc = new Document(iTextSharp.text.PageSize.A4, 36, 36, 63, 10); 
  PdfWriter writer = PdfWriter.GetInstance(doc, fs);
  doc.Open();
  
  string strDSN = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\diy.mdb";
  string strSQL = "SELECT * FROM project where ID='" + dbProjID + "'";
  OleDbConnection myConn = new OleDbConnection(strDSN);
  OleDbDataAdapter myCmd = new OleDbDataAdapter(strSQL, myConn);
  myConn.Open();
  
  DataSet dtSet = new DataSet();
  myCmd.Fill(dtSet, "Developer");
  DataTable dTable = dtSet.Tables[0];
  
  PdfPTable table = new PdfPTable(2);
  table.WidthPercentage = 98;
  table.SpacingBefore = 20f;
  
  PdfPCell cell = new PdfPCell(new Phrase("Customer Information"));
  cell.BackgroundColor = new BaseColor(0, 0, 250);
  cell.Colspan = 2;
  cell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right (for heading allignment)
  table.AddCell(cell);
  
  foreach (DataRow dtRow in dTable.Rows)
  {
       table.AddCell (dtRow.Table.ToString());
  }
  doc.Add(table);
  myConn.Close();
  doc.Close();
  </code></pre>