|Published (Last):||15 January 2014|
|PDF File Size:||7.66 Mb|
|ePub File Size:||12.84 Mb|
|Price:||Free* [*Free Regsitration Required]|
Most elements can be divided in one or more Chunk s. A chunk is a String with a certain Font. All other layout parameters should be defined in the object to which this chunk of text is added. String getContent Returns the content of this Chunk.
Font getFont Gets the font of this Chunk. HyphenationEvent getHyphenation Returns the hyphenation if present. PdfName getRole Gets the role of the accessible element. Chunk setNewPage Sets a new page tag.. String toString Returns the content of this Chunk.
Since: 2. Since: 5. Note that separator chunks can't be used in combination with tab chunks! Parameters: separator - the drawInterface to use to draw the separator. Creates a tab Chunk. Parameters: separator - the drawInterface to use to draw the tab. Returns: false if the Chunk contains other characters than space. Returns: false if there aren't any. It may be null. A value of 1 is normal and a value of 0. Actually, the line can be anywhere vertically and has always the Chunk width. Multiple call to this method will produce multiple lines.
Parameters: color - the color of the line or null to follow the text color thickness - the absolute thickness of the line thicknessMul - the thickness multiplication factor with the font size yPosition - the absolute y position relative to the baseline yPositionMul - the position multiplication factor with the font size cap - the end line cap.
Allowed values are PdfContentByte. Positive values rise the text, negative values lower the text. It can outline text, simulate bold and make text invisible. Parameters: mode - the text rendering mode.
It can be PdfContentByte. Parameters: filename - the file name of the destination document page - the page of the destination to go to.
There must be a local destination matching the name. The text for this tag can be retrieved with PdfPageEvent. If not, it's a metadata object. Since: iText 2. Returns: the HypenationEvent of this Chunk Since: 2. Set role to null if you don't want to tag this element. Note that all child elements won't also be tagged.
All rights reserved. Skip navigation links. Object com. Constructs a chunk of text with a char, without specifying a Font. Constructs a chunk of text with a certain content, without specifying a Font. Constructs a chunk of text with a certain content and a certain Font.
Processes the element by adding it or the different parts to an ElementListener. Creates a separator Chunk. Sets the text horizontal scaling. Sets an horizontal line that can be an underline or a strikethrough. Sets the text displacement relative to the baseline. Skews the text to simulate italic and other effects.
Sets the text rendering mode. Sets a local goto for this Chunk. Sets the generic tag Chunk. Sets the role of the accessiblee element. Sets the textual expansion of the abbreviation or acronym. SKEW Key for text skewing.
TAB Key for drawInterface of the tab. Chunk Empty constructor.
Adding Chunk, Phrase, Paragraph, and List objects Part 1 (iText 5)
The general idea of step Q in listing 1. Behind the scenes, a PdfWriter and a PdfDocument object analyze these objects and translate them into the appropriate PDF syntax, positioning the content on one or more pages, taking into account the page size and margins. As the name of the interface indicates, these objects will be composed of different pieces of text; most of the time, it will be text wrapped in Chunk objects. A Chunk is the smallest significant piece of text that can be added to a Document. The Chunk object contains a StringBuffer that represents a chunk of text whose characters all have the same font, font size, font style, and font color.
newline handling inside chunk/phrase
Most elements can be divided in one or more Chunk s. A chunk is a String with a certain Font. All other layout parameters should be defined in the object to which this chunk of text is added. Fields inherited from interface com.
Subscribe to RSS
I'm using the iText api to create pdf and when I try to write a string with a new line character in the pdf it is coming in one line instead of two lines, ex:. Once fulfilled a row with the appropriate number of cells you will add next cell to the next line. Some name 34k Followers. Tech Sign In Page.
New Blog Post!