/** * sets the hyphenation engine to this <CODE>Chunk</CODE>. * * @param hyphenation * the hyphenation engine * @return this <CODE>Chunk</CODE> */ public Chunk setHyphenation(final HyphenationEvent hyphenation) { return setAttribute(HYPHENATION, hyphenation); }
/** * Sets a local goto for this <CODE>Chunk</CODE>. * <P> * There must be a local destination matching the name. * * @param name * the name of the destination to go to * @return this <CODE>Chunk</CODE> */ public Chunk setLocalGoto(final String name) { return setAttribute(LOCALGOTO, name); }
/** * Sets a generic annotation to this <CODE>Chunk</CODE>. * * @param annotation * the annotation * @return this <CODE>Chunk</CODE> */ public Chunk setAnnotation(final PdfAnnotation annotation) { return setAttribute(PDFANNOTATION, annotation); }
/** * Sets a goto for a remote destination for this <CODE>Chunk</CODE>. * * @param filename * the file name of the destination document * @param name * the name of the destination to go to * @return this <CODE>Chunk</CODE> */ public Chunk setRemoteGoto(final String filename, final String name) { return setAttribute(REMOTEGOTO, new Object[] { filename, name }); }
/** * Sets a generic annotation to this <CODE>Chunk</CODE>. * * @param annotation * the annotation * @return this <CODE>Chunk</CODE> */ public Chunk setAnnotation(final PdfAnnotation annotation) { return setAttribute(PDFANNOTATION, annotation); }
/** * Sets the generic tag <CODE>Chunk</CODE>. * <P> * The text for this tag can be retrieved with <CODE>PdfPageEvent</CODE>. * * @param text * the text for the tag * @return this <CODE>Chunk</CODE> */ public Chunk setGenericTag(final String text) { return setAttribute(GENERICTAG, text); }
/** * Sets a line height tag. * * @return this <CODE>Chunk</CODE> */ public Chunk setLineHeight(float lineheight) { return setAttribute(LINEHEIGHT, lineheight); }
/** * Sets a new page tag.. * * @return this <CODE>Chunk</CODE> */ public Chunk setNewPage() { return setAttribute(NEWPAGE, null); }
/** * Sets a goto for a remote destination for this <CODE>Chunk</CODE>. * * @param filename * the file name of the destination document * @param name * the name of the destination to go to * @return this <CODE>Chunk</CODE> */ public Chunk setRemoteGoto(final String filename, final String name) { return setAttribute(REMOTEGOTO, new Object[] { filename, name }); }
/** * Sets a new page tag.. * * @return this <CODE>Chunk</CODE> */ public Chunk setNewPage() { return setAttribute(NEWPAGE, null); }
/** * Sets the character spacing. * * @param charSpace the character spacing value * @return this <CODE>Chunk</CODE> */ public Chunk setCharacterSpacing(final float charSpace) { return setAttribute(CHAR_SPACING, new Float(charSpace)); }
/** * Sets the word spacing. * * @param wordSpace the word spacing value * @return this <CODE>Chunk</CODE> */ public Chunk setWordSpacing(final float wordSpace) { return setAttribute(WORD_SPACING, new Float(wordSpace)); }
/** * Sets the character spacing. * * @param charSpace the character spacing value * @return this <CODE>Chunk</CODE> */ public Chunk setCharacterSpacing(final float charSpace) { return setAttribute(CHAR_SPACING, new Float(charSpace)); }
/** * Sets the text horizontal scaling. A value of 1 is normal and a value of * 0.5f shrinks the text to half it's width. * * @param scale * the horizontal scaling factor * @return this <CODE>Chunk</CODE> */ public Chunk setHorizontalScaling(final float scale) { return setAttribute(HSCALE, new Float(scale)); }
/** * Sets the word spacing. * * @param wordSpace the word spacing value * @return this <CODE>Chunk</CODE> */ public Chunk setWordSpacing(final float wordSpace) { return setAttribute(WORD_SPACING, new Float(wordSpace)); }
/** * Sets the text displacement relative to the baseline. Positive values rise * the text, negative values lower the text. * <P> * It can be used to implement sub/superscript. * * @param rise * the displacement in points * @return this <CODE>Chunk</CODE> */ public Chunk setTextRise(final float rise) { return setAttribute(SUBSUPSCRIPT, new Float(rise)); }
/** * Sets an action for this <CODE>Chunk</CODE>. * * @param action * the action * @return this <CODE>Chunk</CODE> */ public Chunk setAction(final PdfAction action) { setRole(PdfName.LINK); return setAttribute(ACTION, action); }
public static Chunk createWhitespace(final String content, final boolean preserve) { Chunk whitespace = null; if (!preserve) { whitespace = new Chunk(' '); whitespace.setAttribute(WHITESPACE, content); } else { whitespace = new Chunk(content); } return whitespace; }
public static Chunk createWhitespace(final String content, final boolean preserve) { Chunk whitespace = null; if (!preserve) { whitespace = new Chunk(' '); whitespace.setAttribute(WHITESPACE, content); } else { whitespace = new Chunk(content); } return whitespace; }
/** * Sets an anchor for this <CODE>Chunk</CODE>. * * @param url * the <CODE>URL</CODE> to link to * @return this <CODE>Chunk</CODE> */ public Chunk setAnchor(final URL url) { setRole(PdfName.LINK); String urlStr = url.toExternalForm(); setAccessibleAttribute(PdfName.ALT, new PdfString(urlStr)); return setAttribute(ACTION, new PdfAction(urlStr)); }