title: IText7 Column width issue
body: <p>I have been trying to create a PDF document with <strong>iText7</strong> and with <strong>different column sizes</strong> in the table, In my code, I have already set the width for each column. but I am unable to get the desired result.</p>
  <p><strong>version - itext7-core:7.1.15</strong></p>
  <p>Here is the partial code:</p>
  <pre><code>private void ManipulatePdf(string pdfPath)
  {
      PdfDocument pdfDoc = new PdfDocument(new PdfWriter(pdfPath));
      Document doc = new Document(pdfDoc);
      doc.SetMargins(20, 20, 20, 20);
      Table table2 = new Table(UnitValue.CreatePercentArray(new float[] {10,20,40,10,10,20,10 })).UseAllAvailableWidth();
  
      
      table2.SetWidth(UnitValue.CreatePercentValue(100));
      
      table2.SetFixedLayout();
  
      table2.AddCell(getCellm1(300));
      table2.AddCell(getCellm2(240));
      table2.AddCell(getCellm3(100));
      table2.AddCell(getCellm4(100));
      table2.AddCell(getCellm5(100));
      table2.AddCell(getCellm6(300));
      table2.AddCell(getCellm6(300));
      doc.Add(table2);
      doc.Close();
  }
  
  private Cell getCellm7(int cm)
  {
      Cell cell = new Cell(1, 7);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm6(int cm)
  {
      Cell cell = new Cell(1, 6);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm5(int cm)
  {
      Cell cell = new Cell(1, 5);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm4(int cm)
  {
      Cell cell = new Cell(1, 4);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm3(int cm)
  {
      Cell cell = new Cell(1, 3);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm2(int cm)
  {
      Cell cell = new Cell(1, 2);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  
  private Cell getCellm1(int cm)
  {
      Cell cell = new Cell(1, 1);
  
      Paragraph p = new Paragraph(
      String.Format(&quot;%smm&quot;, 10 * cm)).SetFontSize(8);
      p.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
      cell.Add(p);
      return cell;
  }
  </code></pre>
  <p><strong>output of the above code</strong></p>
  <p><img src="https://i.stack.imgur.com/FwaqQ.png" alt="" /></p>
  <p>from the above code am getting varied column sizes, the result which I want is given below:</p>
  <p><strong>this is how I want columns to look like:</strong>
  <img src="https://i.stack.imgur.com/KDvTv.png" alt="2" /></p>
  <p>If someone has used iText to do such a thing, any advice would be appreciated. Let me know if you need any more information.</p>