This example sets the first line of the second paragraph indent automatically.
TextParagraph paragraph = document.getParagraphs().item(2); paragraph.setAutoFirstLineIndent(true);
Related information
AutoFirstLineIndent property