List of usage examples for com.itextpdf.text Chunk setHyphenation
public Chunk setHyphenation(final HyphenationEvent hyphenation)
Chunk
. From source file:se.billes.pdf.renderer.model.text.Phrase.java
License:Open Source License
public void onRender(com.itextpdf.text.Paragraph paragraph) { Font font = new Font(getBaseFont(), getFontSize()); font.setColor(getBaseColor());//from w w w. j av a 2 s .co m if (getStyle() != null) font.setStyle(getStyle()); String text = getText(); if (text.length() == 0) text = " "; text = text.replace(">", ">"); text = text.replace("<", "<"); Chunk chunk = new Chunk(text, font); if (getParagraph().getHyphenationAuto() != null) { chunk.setHyphenation(getParagraph().getHyphenationAuto()); } chunk.setTextRise(getTextRise()); chunk.setSkew(getSkewAlpha(), getSkewBeta()); paragraph.add(chunk); }