Hello,
i have a question concerning formatting Tables:
i attached a file with a screenshot from my table - for any reason the format of the different row changes inbetween - and the alignment too. what is the best way to get an correctly formatted table ?
my intention is to create bold entries in the first both rows and regular text in the third one.
i’m using this kind of code:
builder.startTable();
builder.getRowFormat().setBottomPadding(0);
builder.insertCell();
builder.getCellFormat().clearFormatting();
builder.getRowFormat().clearCellPadding();
builder.getCellFormat().setBottomPadding(0);
builder.getCellFormat().setTopPadding(0);
builder.getCellFormat().setVerticalMerge(CellMerge.NONE);
builder.getCellFormat().setHorizontalMerge(CellMerge.NONE);
builder.getCellFormat().setWidth(ConvertUtil.millimeterToPoint(5));
builder.getRowFormat().setBottomPadding(0);
builder.getParagraphFormat().setStyle(styleRow1);
builder.writeln("...");
builder.insertCell();
builder.getCellFormat().clearFormatting();
builder.getRowFormat().clearCellPadding();
builder.getCellFormat().setBottomPadding(0);
builder.getCellFormat().setTopPadding(0);
builder.getCellFormat().setVerticalMerge(CellMerge.NONE);
builder.getCellFormat().setWidth(ConvertUtil.millimeterToPoint(70));
builder.getParagraphFormat().setStyle(StyleRow2);
builder.writeln("...");
…
probably a bit too much formatters - but at least i got it running that way…
thanks a lot and best regards,
christian