com.lowagie.text.rtf.document

Class RtfInfoElement

public class RtfInfoElement extends RtfElement

Stores one information group element. Valid elements are author, title, subject, keywords, producer and creationdate.

Version: $Version:$

Author: Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
Stringcontent
The content of this RtfInfoElement
intinfoType
The type of this RtfInfoElement.
static byte[]INFO_AUTHOR
Constant for the author element
static byte[]INFO_CREATION_DATE
Constant for the creationdate element
static byte[]INFO_KEYWORDS
Constant for the keywords element
static byte[]INFO_PRODUCER
Constant for the producer element
static byte[]INFO_SUBJECT
Constant for the subject element
static byte[]INFO_TITLE
Constant for the title element
Constructor Summary
RtfInfoElement(RtfDocument doc, Meta meta)
Constructs a RtfInfoElement based on the given Meta object
Method Summary
StringconvertDate(String date)
Converts a date from the format used by iText to the format required by rtf.
iText: EEE MMM dd HH:mm:ss zzz yyyy - rtf: \\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss
byte[]write()
Writes this RtfInfoElement

Field Detail

content

private String content
The content of this RtfInfoElement

infoType

private int infoType
The type of this RtfInfoElement. The values from Element.INFO_ELEMENT_NAME are used.

INFO_AUTHOR

private static final byte[] INFO_AUTHOR
Constant for the author element

INFO_CREATION_DATE

private static final byte[] INFO_CREATION_DATE
Constant for the creationdate element

INFO_KEYWORDS

private static final byte[] INFO_KEYWORDS
Constant for the keywords element

INFO_PRODUCER

private static final byte[] INFO_PRODUCER
Constant for the producer element

INFO_SUBJECT

private static final byte[] INFO_SUBJECT
Constant for the subject element

INFO_TITLE

private static final byte[] INFO_TITLE
Constant for the title element

Constructor Detail

RtfInfoElement

public RtfInfoElement(RtfDocument doc, Meta meta)
Constructs a RtfInfoElement based on the given Meta object

Parameters: doc The RtfDocument this RtfInfoElement belongs to meta The Meta object this RtfInfoElement is based on

Method Detail

convertDate

private String convertDate(String date)
Converts a date from the format used by iText to the format required by rtf.
iText: EEE MMM dd HH:mm:ss zzz yyyy - rtf: \\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss

Parameters: date The date formated by iText

Returns: The date formated for rtf

write

public byte[] write()
Writes this RtfInfoElement

Returns: A byte array containing the RtfInfoElement data