public class FieldBidiOutline extends Field
To learn more, visit the Working with Fields documentation article.
Remarks:
This field is identical to the AUTONUMLGL field, except for the separator that delimits each level of the paragraph numbering.
Examples:
Shows how to create right-to-left language-compatible lists with BIDIOUTLINE fields.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// The BIDIOUTLINE field numbers paragraphs like the AUTONUM/LISTNUM fields,
// but is only visible when a right-to-left editing language is enabled, such as Hebrew or Arabic.
// The following field will display ".1", the RTL equivalent of list number "1.".
FieldBidiOutline field = (FieldBidiOutline) builder.insertField(FieldType.FIELD_BIDI_OUTLINE, true);
builder.writeln("שלום");
Assert.assertEquals(" BIDIOUTLINE ", field.getFieldCode());
// Add two more BIDIOUTLINE fields, which will display ".2" and ".3".
builder.insertField(FieldType.FIELD_BIDI_OUTLINE, true);
builder.writeln("שלום");
builder.insertField(FieldType.FIELD_BIDI_OUTLINE, true);
builder.writeln("שלום");
// Set the horizontal text alignment for every paragraph in the document to RTL.
for (Paragraph para : (Iterable<Paragraph>) doc.getChildNodes(NodeType.PARAGRAPH, true)) {
para.getParagraphFormat().setBidi(true);
}
// If we enable a right-to-left editing language in Microsoft Word, our fields will display numbers.
// Otherwise, they will display "###".
doc.save(getArtifactsDir() + "Field.BIDIOUTLINE.docx");
getDisplayResult, getEnd, getFieldCode, getFieldCode, getFormat, getLocaleId, getResult, getSeparator, getStart, getType, isDirty, isDirty, isLocked, isLocked, needStoreOldResultNodes, remove, setLocaleId, setResult, unlink, update, update