public class TextDrawer extends AbstractDrawer
Modifier and Type | Field and Description |
---|---|
protected com.itextpdf.text.pdf.ColumnText |
box |
protected ArrayList |
content |
protected XFARectangle |
externalBoxRef |
protected FlattenerContext |
flattenerContext |
protected XFARectangle |
initRect |
protected XFARectangle |
pageSize |
protected JsNode |
parentNode |
protected boolean |
resolved |
protected XFARectangle |
textRectangle |
protected int |
verticalAlignment |
accessibleAttributes, id, role
Constructor and Description |
---|
TextDrawer(JsNode parentNode, XFARectangle pageSize, List |
TextDrawer(JsNode parentNode, XFARectangle pageSize, List |
TextDrawer(JsNode parentNode, XFARectangle pageSize, String plainText, FlattenerContext flattenerContext) |
Modifier and Type | Method and Description |
---|---|
void |
createColumnText(XFARectangle rec) |
void |
draw(com.itextpdf.text.pdf.PdfContentByte canvas, XFARectangle borderArea) |
PositionResult |
draw(com.itextpdf.text.pdf.PdfContentByte canvas, XFARectangle parentBoundingBox, boolean simulate) |
float |
getAutoSizeLimit() |
ArrayList |
getContent() |
String |
getContentAsString() |
FlattenerContext |
getFlattenerContext() |
static String |
getMaxSingleLineText(String originalText, XFARectangle textArea, JsNode node, com.itextpdf.text.Rectangle pageSize, FlattenerContext flattenerContext)
Returns the maximal substring of the original text, starting from the first character, that fits into single line of the passed area.
|
XFARectangle |
getTextRectangle() |
int |
getVerticalAlignment() |
protected void |
initBasedOnPlainTextAndFonts(String plainText, com.itextpdf.text.Font f1, com.itextpdf.text.Font f2) |
boolean |
isAutoSize() |
boolean |
isEmpty() |
protected void |
reInitAutoSizeText() |
void |
resolveEmbeddedElementsAndDraw(boolean forceDraw) |
void |
setAutoSizeLimit(float autoSizeLimit) |
void |
setVerticalAlignment(int verticalAlignment) |
getAccessibleAttribute, getAccessibleAttributes, getId, getRole, isInline, setAccessibleAttribute, setId, setRole
protected final JsNode parentNode
protected final XFARectangle pageSize
protected final FlattenerContext flattenerContext
protected final ArrayListcontent
protected com.itextpdf.text.pdf.ColumnText box
protected XFARectangle textRectangle
protected XFARectangle externalBoxRef
protected XFARectangle initRect
protected int verticalAlignment
protected boolean resolved
public TextDrawer(JsNode parentNode, XFARectangle pageSize, String plainText, FlattenerContext flattenerContext)
public TextDrawer(JsNode parentNode, XFARectangle pageSize, ListrichText, FlattenerContext flattenerContext)
public TextDrawer(JsNode parentNode, XFARectangle pageSize, ListrichText, FlattenerContext flattenerContext, boolean ignoreEmbeddedElement)
protected void initBasedOnPlainTextAndFonts(String plainText, com.itextpdf.text.Font f1, com.itextpdf.text.Font f2)
protected void reInitAutoSizeText()
public static String getMaxSingleLineText(String originalText, XFARectangle textArea, JsNode node, com.itextpdf.text.Rectangle pageSize, FlattenerContext flattenerContext)
public ArrayListgetContent()
public FlattenerContext getFlattenerContext()
public String getContentAsString()
public void createColumnText(XFARectangle rec)
public void draw(com.itextpdf.text.pdf.PdfContentByte canvas, XFARectangle borderArea)
draw
in class AbstractDrawer
public PositionResult draw(com.itextpdf.text.pdf.PdfContentByte canvas, XFARectangle parentBoundingBox, boolean simulate)
public boolean isEmpty()
isEmpty
in class AbstractDrawer
public void resolveEmbeddedElementsAndDraw(boolean forceDraw) throws com.itextpdf.text.DocumentException, IOException
com.itextpdf.text.DocumentException
IOException
public XFARectangle getTextRectangle()
public int getVerticalAlignment()
public void setVerticalAlignment(int verticalAlignment)
public boolean isAutoSize()
public float getAutoSizeLimit()
public void setAutoSizeLimit(float autoSizeLimit)
Copyright (C) 1998-2019 iText Group NV. All Rights Reserved.