This seems to be the itext class to use for line wrapping and determining how many lines of text resulted. (tags: library publishing reference)