I am using the following code to try to create a bulleted list inside of a single cell, but it’s not working. For some reason, the “writeln” method is keeping all of the strings on the same line. If I try adding the new line control character the subsequent lines do not contain the bullet. Is this possible? If so, how do I accomplish this?
public static Cell addBulletedCell(Document asposeDocument, DocumentBuilder builder, Vector<String> text, Function<Cell, Cell>... formatters) {
Cell cell = builder.insertCell();
for (Function<Cell, Cell> formatter: formatters)
cell = formatter.apply(cell);
builder.getListFormat().setList(asposeDocument.getLists().add(ListTemplate.BULLET_DISK));
for(String line: text) {
builder.writeln(line);
}
return cell;
}