Hi,

There is an strange problem happen to me when I use table.setRowHeight();

I'm doing the following code:

double x = 0d;
double y = 100d;
HSLFTable table = slide.createTable(1, 1);
HSLFTableCell cell = table.getCell(0, 0);

cell.setText("Some Dynamic unknown size text");

HSLFTextParagraph paragraph = cell.getTextParagraphs().get(0);
paragraph.getTextRuns().get(0).setFontSize(9);

table.setColumnWidth(0, 119);
table.setRowHeight(0, 20);

y += table.getRowHeight(0);
table.moveTo(x, y);

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?

Best regards
-- 
*Diogo Luzzardi de Carvalho*

*Systems Analyst and Java Developer*

Reply via email to