java.lang.Object
com.aspose.words.ExportListLabels
public class ExportListLabels
- extends java.lang.Object
Utility class containing constants.
Specifies how list labels are exported to HTML, MHTML and EPUB.
Example:
Shows how to export an indented list to .html as plain text.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Use the builder to insert a list
List list = doc.getLists().add(ListTemplate.NUMBER_DEFAULT);
builder.getListFormat().setList(list);
builder.writeln("List item 1.");
builder.getListFormat().listIndent();
builder.writeln("List item 2.");
builder.getListFormat().listIndent();
builder.write("List item 3.");
// When we save this to .html, normally our list will be represented by <li> tags
// We can set this flag to have lists as plain text instead
HtmlSaveOptions options = new HtmlSaveOptions();
{
options.setExportListLabels(ExportListLabels.AS_INLINE_TEXT);
options.setPrettyFormat(true);
}
doc.save(getArtifactsDir() + "HtmlSaveOptions.List.html", options);
- See Also:
- HtmlSaveOptions.ExportListLabels
Field Summary |
static final int | AUTO = 0 | |
Outputs list labels in auto mode. Uses HTML native elements when possible.
|
static final int | AS_INLINE_TEXT = 1 | |
Outputs all list labels as inline text.
|
static final int | BY_HTML_TAGS = 2 | |
Outputs all list labels as HTML native elements.
|
AUTO = 0 | |
public static final int AUTO |
-
Outputs list labels in auto mode. Uses HTML native elements when possible.
HTML <ul> and <ol> tags are used for list label representation if it doesn't cause formatting loss, otherwise the HTML <p> tag is used.
AS_INLINE_TEXT = 1 | |
public static final int AS_INLINE_TEXT |
-
Outputs all list labels as inline text.
HTML <p> tag is used for any list label representation.
BY_HTML_TAGS = 2 | |
public static final int BY_HTML_TAGS |
-
Outputs all list labels as HTML native elements.
HTML <ul> and <ol> tags are used for list label representation. Some formatting loss is possible.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.