Thanks for the reply.
Suppose I have some data and I want to put into some table cell, then how to
calculate the table cell size (i.e. height or width) required. If the text
is to be bold or font need to be changed then how to calculate the new
height and width of the table cell ?
For a standalone text shape you can call TextShape.resizeToFitText() but it
won't work for tables.
Currently HSLF does not provide the requested functionality. In theory you can calculate text dimensions using Java2D
but in general case it's not a trivial task. You will have to take into account spacing between lines, spacing before
and after paragraphs, tabs, text rulers, etc.
Looking at the source code of org.apache.poi.hslf.model.TextPainter might give
an idea how to do that.
Yegor
dinshetty wrote:
I am trying to generate ppt through Java using Apache POI API. I am able
to create table, bulletted text etc using this API.
Please answer the following two questions, if anyone aware of this.
1. How to split text across two slides, if the row had to be broken
across 2 slides because the row is so big that it can only be accomodated
in 2 slide ?
2. How to resize table cell , if the text which is going to put in that
cell is larger than table cell size ?
3. Suppose I have some data and I want to put into some table cell, then
how to calculate the table cell size (i.e. height or width) required. If
the text is to be bold or font need to be changed then how to calculate
the new height and width of the table cell ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]