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()) { p
Firstly why you iterating over Chunk collection casted to Object ? If all elements of this collection are Chunk, use this:
for (Chunk c : el.getChunks()) { paraWidth += c.getWidthPoint(); }
What do you mean saying method does not works correctly ?