public class RtfFile extends RtfContainer
Models the top-level structure of an RTF file.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch), Andreas Putz (a.putz@skynamics.com), and Christopher Scott (scottc@westinghouse.com).
attrib, parent, writer| Constructor and Description |
|---|
RtfFile(java.io.Writer w)
Create an RTF file that outputs to the given Writer
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
must be called when done creating the document
|
RtfDocumentArea |
getDocumentArea()
Call startDocumentArea if needed and return the document area object.
|
RtfListTable |
getListTable()
Get the list table.
|
RtfPageArea |
getPageArea()
Call startPageArea if needed and return the page area object.
|
static void |
main(java.lang.String[] args)
minimal test and usage example
|
RtfDocumentArea |
startDocumentArea()
Closes the RtfHeader if not done yet, and starts the document area.
|
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader |
startHeader()
If called, must be called before startDocumentArea
|
RtfListTable |
startListTable(RtfAttributes attr)
Creates the list table.
|
RtfPageArea |
startPageArea()
Closes the RtfHeader if not done yet, and starts the docment area.
|
protected void |
writeRtfPrefix()
overridden to write RTF prefix code, what comes before our children
|
protected void |
writeRtfSuffix()
overridden to write RTF suffix code, what comes after our children
|
addChild, findChildren, getChildCount, getChildren, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContentclose, getParentOfClass, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNSpublic RtfFile(java.io.Writer w)
throws java.io.IOException
w - the Writer to write tojava.io.IOException - for I/O problemspublic org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader startHeader()
throws java.io.IOException,
RtfStructureException
java.io.IOException - for I/O problemsRtfStructureException - for illegal RTF structurepublic RtfListTable startListTable(RtfAttributes attr) throws java.io.IOException
attr - attributes for the RtfListTablejava.io.IOException - for I/O problemspublic RtfListTable getListTable()
public RtfPageArea startPageArea() throws java.io.IOException, RtfStructureException
java.io.IOException - for I/O problemsRtfStructureException - for illegal RTF structurepublic RtfPageArea getPageArea() throws java.io.IOException, RtfStructureException
java.io.IOException - for I/O problemsRtfStructureException - for illegal RTF structurepublic RtfDocumentArea startDocumentArea() throws java.io.IOException, RtfStructureException
java.io.IOException - for I/O problemsRtfStructureException - for illegal RTF structurepublic RtfDocumentArea getDocumentArea() throws java.io.IOException, RtfStructureException
java.io.IOException - for I/O problemsRtfStructureException - for illegal RTF structureprotected void writeRtfPrefix()
throws java.io.IOException
writeRtfPrefix in class RtfElementjava.io.IOException - for I/O problemsprotected void writeRtfSuffix()
throws java.io.IOException
writeRtfSuffix in class RtfElementjava.io.IOException - for I/O problemspublic void flush()
throws java.io.IOException
java.io.IOException - for I/O problemspublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - command-line argumentsjava.lang.Exception - for problemsCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.