com.lowagie.text.rtf.direct

Class RtfDirectContent

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: $Id: RtfDirectContent.java 3373 2008-05-12 16:21:24Z xlv $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
StringdirectContent
The direct content to add.
static RtfDirectContentDIRECT_SOFT_LINEBREAK
Add the DIRECT_SOFT_LINEBREAK to the Document to insert a soft line-break at that position.
Constructor Summary
RtfDirectContent(String directContent)
Constructs a new RtfDirectContent with the content to add.
Method Summary
voidwriteContent(OutputStream out)
Writes the element content to the given output stream.

Field Detail

directContent

private String directContent
The direct content to add.

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.

Constructor Detail

RtfDirectContent

public RtfDirectContent(String directContent)
Constructs a new RtfDirectContent with the content to add.

Parameters: directContent The content to add.

Method Detail

writeContent

public void writeContent(OutputStream out)
Writes the element content to the given output stream.