content
This is the content of this chunk of text.
Element, MarkupAttributes
Most elements can be divided in one or more Chunks. A chunk
is a String with a certain Font. all other
layoutparameters should be defined in the object to which this chunk of text
is added.
Example:
Chunk chunk = new Chunk("Hello world",
FontFactory.getFont(FontFactory.COURIER, 20, Font.ITALIC, new Color(255, 0,
0))); document.add(chunk);
static final Stringprotected HashMapstatic final Stringstatic final Stringprotected StringBufferstatic final Stringprotected FontFont of this chunk of text.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Propertiesstatic final Chunkstatic final Stringstatic final Chunkstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLEprotected Chunk() Chunk(char c) Font
. Font. Font.
Font. Chunk(Properties attributes) Chunk that has been constructed taking in
account the value of some attributes .static Object[][]addToArray(Object[][] original,
Object[] item) Chunk.content()Chunk.font()Chunk.Chunk.getFont()floatstatic SetgetMarkupAttribute(String name) Set of String attribute names for the
MarkupAttributes implementor.Properties-object containing all the markupAttributes.floatfloatbooleanChunk.booleanisEmpty()Chunk is empty.static booleanbooleanprocess(ElementListener listener)
ElementListener.Chunk.Chunk.Chunk.setAnnotation(PdfAnnotation annotation) Chunk.private ChunksetAttribute(String name,
Object obj) setBackground(Color color) Chunk.setBackground(Color color,
float extraLeft,
float extraBottom,
float extraRight,
float extraTop) Chunk.voidChunk.setGenericTag(String text) Chunk.setHorizontalScaling(float scale) setHyphenation(HyphenationEvent hyphenation) Chunk.setLocalDestination(String name) Chunk.setLocalGoto(String name) Chunk.voidsetMarkupAttribute(String name,
String value) voidsetMarkupAttributes(Properties markupAttributes) setRemoteGoto(String filename,
int page) Chunk.setRemoteGoto(String filename,
String name) Chunk.setSkew(float alpha,
float beta) setSplitCharacter(SplitCharacter splitCharacter) setTextRenderMode(int mode,
float strokeWidth,
Color strokeColor) setTextRise(float rise) setUnderline(float thickness,
float yPosition) setUnderline(Color color,
float thickness,
float thicknessMul,
float yPosition,
float yPositionMul,
int cap) toString()Chunk.inttype()Font of this chunk of text.Font.content - the contentFont.c - the contentfont - the fontFont
.c - the contentChunk that has been constructed taking in
account the value of some attributes .attributes - Some attributes
ElementListener.Chunk.string - StringStringBufferChunk is empty.false if the Chunk contains other characters than
space.It can be used to implement sub/superscript.
rise - the displacement in pointsChunkmode - the text rendering mode. It can be
PdfContentByte.TEXT_RENDER_MODE_FILL,
PdfContentByte.TEXT_RENDER_MODE_STROKE,
PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE and
PdfContentByte.TEXT_RENDER_MODE_INVISIBLE.strokeWidth - the stroke line width for the modes
PdfContentByte.TEXT_RENDER_MODE_STROKE and
PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE.strokeColor - the stroke color or null to follow the text
colorChunkalpha=0
and beta=12.alpha - the first angle in degreesbeta - the second angle in degreesChunkscale - the horizontal scaling factorChunkChunk.color - the color of the backgroundextraLeft - increase the size of the rectangle in the leftextraBottom - increase the size of the rectangle in the bottomextraRight - increase the size of the rectangle in the rightextraTop - increase the size of the rectangle in the topChunk
Chunk width. Multiple call to this method will produce multiple
lines.thickness - the absolute thickness of the lineyPosition - the absolute y position relative to the baselineChunk
Chunk width. Multiple call to this method will produce multiple
lines.color - the color of the line or null to follow the
text colorthickness - the absolute thickness of the linethicknessMul - the thickness multiplication factor with the font sizeyPosition - the absolute y position relative to the baselineyPositionMul - the position multiplication factor with the font sizecap - the end line cap. Allowed values are
PdfContentByte.LINE_CAP_BUTT, PdfContentByte.LINE_CAP_ROUND
and PdfContentByte.LINE_CAP_PROJECTING_SQUAREChunkChunk.annotation - the annotationChunkChunk.hyphenation - the hyphenation engineChunksplitCharacter - the SplitCharacter interfaceChunkChunk.
It may be null.
ChunkChunk.tag - the given tagMarkupAttributessetMarkupAttribute in interface MarkupAttributesname - String attribute name.value - String attribute value.MarkupAttributessetMarkupAttributes in interface MarkupAttributesmarkupAttributes - a Properties-object containing markupattributesMarkupAttributesgetMarkupAttribute in interface MarkupAttributesname - String attribute name.String.MarkupAttributesSet of String attribute names for the
MarkupAttributes implementor.getMarkupAttributeNames in interface MarkupAttributesSet.MarkupAttributesProperties-object containing all the markupAttributes.getMarkupAttributes in interface MarkupAttributesProperties