title: How do we convert MultiColumnText to ColumnText in iText?
body: <p>This is the code I have using OpenPDF (old version of iText 4). I searched for possible solutions online but all the implementations of ColumnText were confusing. I tried to implement it also but didn't get the the expected results.</p>
  
  <pre><code>MultiColumnText mct = new MultiColumnText();
  mct.addReguarColumns(document.left(), document.right(), column.gutter, column.colNum);
  Paragraph p = new Paragraph("Testing");
  mct.addElement(p);
  document.add(mct);
  </code></pre>
  
  <p>This was with MultiColumnText. Now, I was testing iText 5 and found out MultiColumnText is removed. I saw one question here that was for C# and I changed the code to following to support ColumnText:</p>
  
  <pre><code>ColumnText mct = new ColumnText(writer.getDirectContent());
  float middle = (document.left() + document.right()) / 2;
  float[][] COLUMNS = {
                  { document.left(), document.bottom(), middle - 15, document.top() } ,
                  { middle + 15, document.bottom(), document.right(), document.top() }
          };
  Paragraph p = new Paragraph("Testing");
  mct.addElement(p);
  int col = 0;
  int count = 0;
  int status = ColumnText.START_COLUMN;
  while (ColumnText.hasMoreText(status)) {
  mct.setSimpleColumn(
  COLUMNS[col][0], COLUMNS[col][1],
  COLUMNS[col][2], COLUMNS[col][3]);
  status = mct.go();
  if (++count &gt; 1) {
        count = 0;
        document.newPage();
  }
  }
  </code></pre>
  
  <p>But the output was a mess. Am I missing something here?</p>