iText, PageSize A4 - units
<p>I'm creating document in iText. I need custom width however when it's smaller than A4 standard width, it should be set to A4 standard width.</p>

<p>So I got:</p>

<pre><code>float pageWidth = columns.size() * 100;
if (pageWidth &lt; PageSize.A4.getWidth()) {
       pageWidth = PageSize.A4.getWidth();
}
table.setTotalWidth(pageWidth);
</code></pre>

<p>And it's not working, probably because <code>pageWidth</code> and <code>PageSize.A4.getWidth()</code> got different units. 
When I debugged this, I got <code>900.0</code> value in <code>pageWidth</code> and <code>PageSize.A4.getWidth()</code> returns <code>595.0</code>
So what do I need to change to get same units for comparison?</p>