com.lowagie.text.rtf.direct
Class RtfDirectContent
java.lang.Object
com.lowagie.text.Chunk
com.lowagie.text.rtf.RtfAddableElement
com.lowagie.text.rtf.direct.RtfDirectContent
- All Implemented Interfaces:
- Element, MarkupAttributes, RtfBasicElement
- public class RtfDirectContent
- extends RtfAddableElement
The RtfDirectContent makes it possible to directly add RTF code into
an RTF document. This can be used to directly add RTF fragments that
have been created with other RTF editors. One important aspect is that
font and color numbers will not be modified. This means that the
fonts and colors visible in the final document might not be equivalent
with those set on the direct content.
For convenience the RtfDirectContent provides a DIRECT_SOFT_LINEBREAK
constant that makes it possible to easily add soft line-breaks anywhere in
the RTF document.
- Version:
- $Revision: 1.3 $
- Author:
- Mark Hall (mhall@edu.uni-klu.ac.at)
Fields inherited from class com.lowagie.text.Chunk |
ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, markupAttributes, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE |
Fields inherited from interface com.lowagie.text.Element |
ALIGN_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, TITLE |
Constructor Summary |
RtfDirectContent(String directContent)
Constructs a new RtfDirectContent with the content to add. |
Method Summary |
byte[] |
write()
Writes the direct content. |
Methods inherited from class com.lowagie.text.Chunk |
addToArray, append, content, font, getAttributes, getChunks, getHorizontalScaling, getImage, getKeySet, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getTextRise, getWidthPoint, hasAttributes, isTag, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setMarkupAttribute, setMarkupAttributes, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type |
DIRECT_SOFT_LINEBREAK
public static final RtfDirectContent DIRECT_SOFT_LINEBREAK
- Add the DIRECT_SOFT_LINEBREAK to the Document to insert
a soft line-break at that position.
directContent
private String directContent
- The direct content to add.
RtfDirectContent
public RtfDirectContent(String directContent)
- Constructs a new RtfDirectContent with the content to add.
- Parameters:
directContent
- The content to add.
write
public byte[] write()
- Writes the direct content.
- Specified by:
write
in interface RtfBasicElement
- Specified by:
write
in class RtfAddableElement