private int GetInfo(String character, PdfAcroForm form, String name) { PdfFormField field = form.GetField(name); PdfFont font = field.GetFont(); FontMetrics fontMetrics = font.GetFontProgram().GetFontMetrics(); float fontSize = field.GetFontSize(); if (fontSize == 0) { return(1000); } Rectangle rectangle = field.GetWidgets()[0].GetRectangle().ToRectangle(); // Factor here is a leading value. We calculate it by subtracting lower left corner value from // the upper right corner value of the glyph bounding box float factor = (fontMetrics.GetBbox()[3] - fontMetrics.GetBbox()[1]) / 1000f; int rows = (int)Math.Round(rectangle.GetHeight() / (fontSize * factor) + 0.5f); int columns = (int)Math.Round(rectangle.GetWidth() / font.GetWidth(character, fontSize) + 0.5f); return(rows * columns); }