Example usage for com.lowagie.text Chunk getAttributes

List of usage examples for com.lowagie.text Chunk getAttributes

Introduction

In this page you can find the example usage for com.lowagie.text Chunk getAttributes.

Prototype


public HashMap getAttributes() 

Source Link

Document

Gets the attributes for this Chunk.

Usage

From source file:fr.opensagres.odfdom.converter.pdf.internal.stylable.StylableParagraph.java

License:Open Source License

@SuppressWarnings("unchecked")
private void postProcessBookmarks() {
    // add space if last chunk is a bookmark
    // otherwise the bookmark will disappear from pdf
    ArrayList<Chunk> chunks = getChunks();
    if (chunks.size() > 0) {
        Chunk lastChunk = chunks.get(chunks.size() - 1);
        String localDestination = null;
        if (lastChunk.getAttributes() != null) {
            localDestination = (String) lastChunk.getAttributes().get(Chunk.LOCALDESTINATION);
        }// w w  w. jav  a 2s  .co m
        if (localDestination != null) {
            super.add(new Chunk(ODFUtils.NON_BREAKING_SPACE_STR));
        }
    }
}