List of usage examples for com.itextpdf.text TextElementArray add
public boolean add(Element element);
TextElementArray
. From source file:com.masscustsoft.service.ToPdf.java
License:Open Source License
/** * Flushes the current paragraph, indicating that we're starting * a new block./*from ww w . java 2 s.c o m*/ * If the stack is empty, the paragraph is added to the document. * Otherwise the Paragraph is added to the stack. * @since 5.0.6 */ public void carriageReturn() throws DocumentException { if (currentParagraph == null) return; if (stack.empty()) document.add(currentParagraph); else { Element obj = stack.pop(); if (obj instanceof TextElementArray) { TextElementArray current = (TextElementArray) obj; current.add(currentParagraph); } stack.push(obj); } currentParagraph = null; }