Package 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:
com.lowagie.text.Element
,RtfBasicElement
,com.lowagie.text.RtfElementInterface
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.
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 3580 2008-08-06 15:52:00Z howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RtfDirectContent
Add the DIRECT_SOFT_LINEBREAK to the Document to insert a soft line-break at that position.private final String
The direct content to add.Fields inherited from class com.lowagie.text.rtf.RtfAddableElement
doc, inHeader, inTable
Fields inherited from class com.lowagie.text.Chunk
ACTION, attributes, BACKGROUND, CHAR_SPACING, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, 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, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
-
Constructor Summary
ConstructorsConstructorDescriptionRtfDirectContent
(String directContent) Constructs a new RtfDirectContent with the content to add. -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeContent
(OutputStream out) Writes the element content to the given output stream.Methods inherited from class com.lowagie.text.rtf.RtfAddableElement
intToByteArray, isEmpty, setInHeader, setInTable, setRtfDocument
Methods inherited from class com.lowagie.text.Chunk
append, getCharacterSpacing, getChunkAttributes, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setCharacterSpacing, setChunkAttributes, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type
-
Field Details
-
DIRECT_SOFT_LINEBREAK
Add the DIRECT_SOFT_LINEBREAK to the Document to insert a soft line-break at that position. -
directContent
The direct content to add.
-
-
Constructor Details
-
RtfDirectContent
Constructs a new RtfDirectContent with the content to add.- Parameters:
directContent
- The content to add.
-
-
Method Details
-
writeContent
Writes the element content to the given output stream.- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfAddableElement
- Parameters:
out
- TheOutputStream
to write the content to- Throws:
IOException
-