title: Cut off data in pdf table
body: <p>I'm trying to cut off the time portion of my data in a PDF printout. The table it prints is from a datagridview table and is the first column called <strong>Date</strong> (<code>column[0]</code>). Since removing the time out of the data has proven to be such a pain, I wondered if there was a way to just cut the data that doesn't fit the column. I tried a fixed width and no text wrap but it still wraps the time underneath it. Below is the current code.</p>
  
  <pre><code>    private void run_btn_Click(object sender, EventArgs e)
      {          
          SaveFileDialog svg = new SaveFileDialog();
          svg.Filter = "PDF File|*.pdf";
          svg.ShowDialog();
  
          using (FileStream stream = new FileStream(svg.FileName, FileMode.Create))
          {
              Document doc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
              PdfWriter.GetInstance(doc, stream);
              doc.Open();
  
              Paragraph paragraph = new Paragraph("" + DateTime.Now.ToShortDateString() +"\n\n");
              doc.Add(paragraph);
  
              PdfPTable table = new PdfPTable(CK_QA_DataDataGridView.Columns.Count);
              table.DefaultCell.Padding = 5;
  
              table.WidthPercentage = 95;
              table.HorizontalAlignment = Element.ALIGN_CENTER;
              table.DefaultCell.BorderWidth = 1;
              //Adding Header row
  
              foreach (DataGridViewColumn column in CK_QA_DataDataGridView.Columns)
              {
                  PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText));
                  cell.BackgroundColor = new iTextSharp.text.BaseColor(240, 240, 240);
                  table.AddCell(cell);
              }
              //Adding DataRow
              foreach (DataGridViewRow row in CK_QA_DataDataGridView.Rows)
              {
                  foreach (DataGridViewCell cell in row.Cells)
                  {
                      table.AddCell(cell.Value.ToString());
                  }
              }
              //Add Table
              doc.Add(table);
  
              doc.Close();
              stream.Close();
  </code></pre>