The strange is that the table.getRowHeight(0) is returning 27 as a result
and when I open the ppt file the table has 1.6cm of height. With this I
can't correct move the table to the position that I want. I also tried to
get the value for the y variable using table.getAnchor().getMaxY() but the
result is also 27.
Has I need to create several tables with different number of columns I need
to get the correct value to sum in the y variable to be able to set the
correct position for my tables.
Could any one give me the correct directions to solve my problem?
> The strange is that the table.getRowHeight(0) is returning 27 as a result
> and when I open the ppt file the table has 1.6cm of height.
the setRowHeight method can't be used to set a height less than necessary to display the cell text.
I've noticed that HSLF is scaling the given points to pixels, opposed to what is written in the javadocs.
Although I regard this as a bug, I'm not sure if I should silently change the implementation or
introduce another (named) method with the correct behavior.
if you need the height in centimeters you can use the following:
double heightInPoints = table.getRowHeight(0);
double heightInCm = heightInPoints * Units.EMU_PER_POINT / Units.EMU_PER_CENTIMETER;
> With this I can't correct move the table to the position that I want.
Depending on the text I get correct calculated bounding boxes for the cells.
Please describe a bit more, what you are trying to achieve with the row heights.