Example usage for com.itextpdf.text ListItem adjustListSymbolFont

List of usage examples for com.itextpdf.text ListItem adjustListSymbolFont

Introduction

In this page you can find the example usage for com.itextpdf.text ListItem adjustListSymbolFont.

Prototype

public void adjustListSymbolFont() 

Source Link

Document

Changes the font of the list symbol to the font of the first chunk in the list item.

Usage

From source file:com.masscustsoft.service.ToPdf.java

License:Open Source License

/**
 * Looks for the List object on the Stack,
 * and adds the ListItem to the List.//from   ww w .j a  v  a2s  .  com
 * @throws DocumentException
 * @since 5.0.6
 */
public void processListItem() throws DocumentException {
    if (stack.empty())
        return;
    Element obj = stack.pop();
    if (!(obj instanceof ListItem)) {
        stack.push(obj);
        return;
    }
    if (stack.empty()) {
        document.add(obj);
        return;
    }
    ListItem item = (ListItem) obj;
    Element list = stack.pop();
    if (!(list instanceof com.itextpdf.text.List)) {
        stack.push(list);
        return;
    }
    ((com.itextpdf.text.List) list).add(item);
    item.adjustListSymbolFont();
    stack.push(list);
}