Example usage for com.itextpdf.text SplitCharacter SplitCharacter

List of usage examples for com.itextpdf.text SplitCharacter SplitCharacter

Introduction

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

Prototype

SplitCharacter

Source Link

Usage

From source file:com.vectorprint.report.itext.style.stylers.NoWrap.java

License:Open Source License

@Override
public <E> E style(E text, Object data) throws VectorPrintException {
    if (text instanceof PdfPCell) {
        ((PdfPCell) text).setFixedHeight(((PdfPCell) text).getPhrase().getFont().getCalculatedSize() + 3f);

        return text;
    } else if (text instanceof Chunk) {
        ((Chunk) text).setSplitCharacter(new SplitCharacter() {
            @Override/*from   w w w  .  j a v a2  s  .c  o  m*/
            public boolean isSplitCharacter(int i, int i1, int i2, char[] chars, PdfChunk[] pcs) {
                return false;
            }
        });
    }

    return text;
}