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(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(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, writeRtfContent
close, getParentOfClass, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
public RtfFile(Writer w) throws IOException
w
- the Writer to write toIOException
- for I/O problemspublic org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader startHeader() throws IOException, RtfStructureException
IOException
- for I/O problemsRtfStructureException
- for illegal RTF structurepublic RtfListTable startListTable(RtfAttributes attr) throws IOException
attr
- attributes for the RtfListTableIOException
- for I/O problemspublic RtfListTable getListTable()
public RtfPageArea startPageArea() throws IOException, RtfStructureException
IOException
- for I/O problemsRtfStructureException
- for illegal RTF structurepublic RtfPageArea getPageArea() throws IOException, RtfStructureException
IOException
- for I/O problemsRtfStructureException
- for illegal RTF structurepublic RtfDocumentArea startDocumentArea() throws IOException, RtfStructureException
IOException
- for I/O problemsRtfStructureException
- for illegal RTF structurepublic RtfDocumentArea getDocumentArea() throws IOException, RtfStructureException
IOException
- for I/O problemsRtfStructureException
- for illegal RTF structureprotected void writeRtfPrefix() throws IOException
writeRtfPrefix
in class RtfElement
IOException
- for I/O problemsprotected void writeRtfSuffix() throws IOException
writeRtfSuffix
in class RtfElement
IOException
- for I/O problemspublic void flush() throws IOException
IOException
- for I/O problemsCopyright © 2025 Apache Software Foundation. All rights reserved.