Example usage for com.lowagie.text Element PARAGRAPH

List of usage examples for com.lowagie.text Element PARAGRAPH

Introduction

In this page you can find the example usage for com.lowagie.text Element PARAGRAPH.

Prototype

int PARAGRAPH

To view the source code for com.lowagie.text Element PARAGRAPH.

Click Source Link

Document

This is a possible type of Element.

Usage

From source file:com.amphisoft.epub2pdf.content.XhtmlHandler.java

License:Open Source License

private void checkTextElementArrayForTocAnchors(Document doc, TextElementArray tea) throws DocumentException {
    if (tea instanceof Anchor) {
        Anchor a = (Anchor) tea;/* w  w  w . ja v a 2 s  .  c o  m*/
        addAnchorToBookmarks(a);
    } else {
        if (tea.type() == Element.PARAGRAPH) {
            Paragraph p = (Paragraph) tea;
            for (int i = 0; i < p.size(); i++) {
                Object o = p.get(i);
                if (o instanceof TextElementArray) {
                    checkTextElementArrayForTocAnchors(doc, (TextElementArray) o);
                }
            }
        }
    }
}