com.lowagie.text.rtf.direct
public class: RtfDirectContent [javadoc |
source]
java.lang.Object
com.lowagie.text.Chunk
com.lowagie.text.rtf.RtfAddableElement
com.lowagie.text.rtf.direct.RtfDirectContent
All Implemented Interfaces:
RtfBasicElement, Element
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:
$ - Id: RtfDirectContent.java 3373 2008-05-12 16:21:24Z xlv $
- author:
Mark - Hall (Mark.Hall@mail.room3b.eu)
- author:
Thomas - Bickel (tmb99@inode.at)
| Field Summary |
|---|
| public static final RtfDirectContent | DIRECT_SOFT_LINEBREAK | Add the DIRECT_SOFT_LINEBREAK to the Document to insert
a soft line-break at that position. |
| Fields inherited from com.lowagie.text.Chunk: |
|---|
| OBJECT_REPLACEMENT_CHARACTER, NEWLINE, NEXTPAGE, content, font, attributes, SEPARATOR, TAB, HSCALE, UNDERLINE, SUBSUPSCRIPT, SKEW, BACKGROUND, TEXTRENDERMODE, SPLITCHARACTER, HYPHENATION, REMOTEGOTO, LOCALGOTO, LOCALDESTINATION, GENERICTAG, IMAGE, ACTION, NEWPAGE, PDFANNOTATION, COLOR, ENCODING |
| Constructor: |
public RtfDirectContent(String directContent) {
this.directContent = directContent;
}
Constructs a new RtfDirectContent with the content to add. Parameters:
directContent - The content to add.
|
| Method from com.lowagie.text.rtf.direct.RtfDirectContent Summary: |
|---|
|
writeContent |
| Methods from com.lowagie.text.Chunk: |
|---|
|
append, getAttributes, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isEmpty, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setAttributes, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type |
| Method from com.lowagie.text.rtf.direct.RtfDirectContent Detail: |
public void writeContent(OutputStream out) throws IOException {
final byte[] contentBytes = this.directContent.getBytes();
out.write(contentBytes);
}
Writes the element content to the given output stream. |