Example usage for com.lowagie.text Chunk LOCALDESTINATION

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

Introduction

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

Prototype

String LOCALDESTINATION

To view the source code for com.lowagie.text Chunk LOCALDESTINATION.

Click Source Link

Document

Key for local destination.

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  . j  a v  a 2s . com
        if (localDestination != null) {
            super.add(new Chunk(ODFUtils.NON_BREAKING_SPACE_STR));
        }
    }
}