Calculate element height itext

Thursday, July 3, 2014

I am generating pdf files by XML data.


I calculate the height of a paragraph element as :



float paraWidth = 0.0f;
for (Object o : el.getChunks()) {
paraWidth += ((Chunk) o).getWidthPoint();
}
float paraHeight = paraWidth/PageSize.A4.getWidth();


But this method does not works correctly.


Can you give me an idea?







http://ift.tt/1jMkvb9