Example usage for com.lowagie.text TextElementArray type

List of usage examples for com.lowagie.text TextElementArray type

Introduction

In this page you can find the example usage for com.lowagie.text TextElementArray type.

Prototype


public int type();

Source Link

Document

Gets the type of the text 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;//from w  ww  .j  a  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);
                }
            }
        }
    }
}