blahblah.setAlignment(LwgElement.ALIGN_JUSTIFIED);
}
// in every chapter 3 sections will be added
for (int j = 1; j < 4; j++) {
Paragraph sTitle = new Paragraph("This is section " + j + " in chapter " + i, sectionFont);
Section section = chapter.addSection(sTitle, 1);
// for chapters > 2, the outine isn't open by default
if (i > 2) section.setBookmarkOpen(false);
// in all chapters except the 1st one, some extra text is added to section 3
if (j == 3 && i > 1) {
section.setIndentationLeft(72);