Hi,
I'm trying to calculate text width and determine number of columns the page can contain. I found XGraphics, which has method MeasureString() that return a XSize, but I'm not sure what the unit of that is and how that turns into Unit:
Code:
XGraphics graphics = XGraphics.CreateMeasureContext(new XSize(8.5, 11), XGraphicsUnit.Inch, XPageDirection.Downwards);
Document document = new Document();
Section section = this.Document.AddSection();
Table table = section.AddTable();
string text = "some column text";
XSize size = Graphics.MeasureString(text, new XFont("Arial", 1.2));
Column column = table.AddColumn(/* size to unit here*/);