Package org.apache.fop.render.rtf
Class RTFHandler
java.lang.Object
org.apache.fop.fo.FOEventHandler
org.apache.fop.render.rtf.RTFHandler
RTF Handler: generates RTF output using the structure events from
the FO Tree sent to this structure handler.
-
Field Summary
Fields inherited from class org.apache.fop.fo.FOEventHandler
fontInfo, foUserAgent -
Constructor Summary
ConstructorsConstructorDescriptionRTFHandler(FOUserAgent userAgent, OutputStream os) Creates a new RTF structure handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidendColumn(TableColumn tc) booleanendContainer(Class containerClass) Closes any mismatched tags that are detected in the RTF structure.voidThis method is called to indicate the end of a document run.voidvoidendFooter(TableFooter footer) voidendFootnote(Footnote footnote) Process the ending of a footnote.voidendFootnoteBody(FootnoteBody body) Process the ending of a footnote body.voidendHeader(TableHeader header) voidvoidProcess the end of an InstreamForeignObject.voidProcess end of a Link.voidvoidendListBody(ListItemBody listItemBody) Process end of a ListBody.voidendListItem(ListItem li) voidendListLabel(ListItemLabel listItemLabel) Process end of a ListLabel.voidProcess end of a Markup.voidendPageNumber(PageNumber pagenum) voidendPageSequence(PageSequence pageSeq) voidvoidendStatic(StaticContent statisContent) Process end of a Static.voidprotected voidCentral exception handler for I/O exceptions.voidimage(ExternalGraphic eg) Process an ExternalGraphic.voidpageRef()Process a pageRef.voidstartBlock(Block bl) voidvoidvoidvoidvoidThis method is called to indicate the start of a new document run.voidThis method is called to indicate the start of a new fo:flow or fo:static-content.voidstartFooter(TableFooter footer) voidstartFootnote(Footnote footnote) Process the start of a footnote.voidProcess the start of a footnote body.voidstartHeader(TableHeader header) voidstartInline(Inline inl) voidProcess the start of a Leader.voidProcess start of a Link.voidvoidstartListBody(ListItemBody listItemBody) Process start of a ListBody.voidvoidstartListLabel(ListItemLabel listItemLabel) Process start of a ListLabel.voidProcess start of a Markup.voidstartPageNumber(PageNumber pagenum) voidvoidvoidstartPageSequence(PageSequence pageSeq) voidvoidstartStatic(StaticContent staticContent) Process start of a Static.voidstartTable(Table tbl) voidtext(FOText text, CharSequence characters) Methods inherited from class org.apache.fop.fo.FOEventHandler
character, characters, endExternalDocument, endLeader, endPageNumberCitation, endPageNumberCitationLast, endRetrieveMarker, endRetrieveTableMarker, endRoot, endWrapper, getFontInfo, getResults, getUserAgent, restoreState, restoreState, startExternalDocument, startInstreamForeignObject, startRetrieveMarker, startRetrieveTableMarker, startRoot, startWrapper
-
Constructor Details
-
RTFHandler
Creates a new RTF structure handler.- Parameters:
userAgent- the FOUserAgent for this processos- OutputStream to write to
-
-
Method Details
-
handleIOTrouble
Central exception handler for I/O exceptions.- Parameters:
ioe- IOException to handle
-
startDocument
This method is called to indicate the start of a new document run.- Overrides:
startDocumentin classFOEventHandler- Throws:
SAXException- In case of a problem
-
endDocument
This method is called to indicate the end of a document run.- Overrides:
endDocumentin classFOEventHandler- Throws:
SAXException- In case of a problem
-
startPageSequence
- Overrides:
startPageSequencein classFOEventHandler- Parameters:
pageSeq- PageSequence that is starting.
-
endPageSequence
- Overrides:
endPageSequencein classFOEventHandler- Parameters:
pageSeq- PageSequence that is ending.
-
startFlow
This method is called to indicate the start of a new fo:flow or fo:static-content. This method also handles fo:static-content tags, because the StaticContent class is derived from the Flow class.- Overrides:
startFlowin classFOEventHandler- Parameters:
fl- Flow that is starting.
-
endFlow
- Overrides:
endFlowin classFOEventHandler- Parameters:
fl- Flow that is ending.
-
startBlock
- Overrides:
startBlockin classFOEventHandler- Parameters:
bl- Block that is starting.
-
endBlock
- Overrides:
endBlockin classFOEventHandler- Parameters:
bl- Block that is ending.
-
startBlockContainer
- Overrides:
startBlockContainerin classFOEventHandler- Parameters:
blc- BlockContainer that is starting.
-
endBlockContainer
- Overrides:
endBlockContainerin classFOEventHandler- Parameters:
bl- BlockContainer that is ending.
-
startTable
- Overrides:
startTablein classFOEventHandler- Parameters:
tbl- Table that is starting.
-
endTable
- Overrides:
endTablein classFOEventHandler- Parameters:
tbl- Table that is ending.
-
startColumn
- Overrides:
startColumnin classFOEventHandler- Parameters:
tc- TableColumn that is starting;
-
endColumn
- Overrides:
endColumnin classFOEventHandler- Parameters:
tc- TableColumn that is ending;
-
startHeader
- Overrides:
startHeaderin classFOEventHandler- Parameters:
header- TableHeader that is starting;
-
endHeader
- Overrides:
endHeaderin classFOEventHandler- Parameters:
header- TableHeader that is ending.
-
startInline
- Overrides:
startInlinein classFOEventHandler- Parameters:
inl- Inline that is starting.
-
endInline
- Overrides:
endInlinein classFOEventHandler- Parameters:
inl- Inline that is ending.
-
startBody
- Overrides:
startBodyin classFOEventHandler- Parameters:
body- TableBody that is starting.
-
endBody
- Overrides:
endBodyin classFOEventHandler- Parameters:
body- TableBody that is ending.
-
startRow
- Overrides:
startRowin classFOEventHandler- Parameters:
tr- TableRow that is starting.
-
endRow
- Overrides:
endRowin classFOEventHandler- Parameters:
tr- TableRow that is ending.
-
startCell
- Overrides:
startCellin classFOEventHandler- Parameters:
tc- TableCell that is starting.
-
endCell
- Overrides:
endCellin classFOEventHandler- Parameters:
tc- TableCell that is ending.
-
startList
- Overrides:
startListin classFOEventHandler- Parameters:
lb- ListBlock that is starting.
-
endList
- Overrides:
endListin classFOEventHandler- Parameters:
lb- ListBlock that is ending.
-
startListItem
- Overrides:
startListItemin classFOEventHandler- Parameters:
li- ListItem that is starting.
-
endListItem
- Overrides:
endListItemin classFOEventHandler- Parameters:
li- ListItem that is ending.
-
startListLabel
Process start of a ListLabel.- Overrides:
startListLabelin classFOEventHandler- Parameters:
listItemLabel- ListItemLabel that is starting
-
endListLabel
Process end of a ListLabel.- Overrides:
endListLabelin classFOEventHandler- Parameters:
listItemLabel- ListItemLabel that is ending
-
startListBody
Process start of a ListBody.- Overrides:
startListBodyin classFOEventHandler- Parameters:
listItemBody- ListItemBody that is starting
-
endListBody
Process end of a ListBody.- Overrides:
endListBodyin classFOEventHandler- Parameters:
listItemBody- ListItemBody that is ending
-
startStatic
Process start of a Static.- Overrides:
startStaticin classFOEventHandler- Parameters:
staticContent- StaticContent that is starting
-
endStatic
Process end of a Static.- Overrides:
endStaticin classFOEventHandler- Parameters:
statisContent- StaticContent that is ending
-
startMarkup
public void startMarkup()Process start of a Markup.- Overrides:
startMarkupin classFOEventHandler
-
endMarkup
public void endMarkup()Process end of a Markup.- Overrides:
endMarkupin classFOEventHandler
-
startLink
Process start of a Link.- Overrides:
startLinkin classFOEventHandler- Parameters:
basicLink- BasicLink that is starting
-
endLink
Process end of a Link.- Overrides:
endLinkin classFOEventHandler- Parameters:
basicLink- BasicLink that is ending
-
image
Process an ExternalGraphic.- Overrides:
imagein classFOEventHandler- Parameters:
eg- ExternalGraphic to process.
-
endInstreamForeignObject
Process the end of an InstreamForeignObject.- Overrides:
endInstreamForeignObjectin classFOEventHandler- Parameters:
ifo- InstreamForeignObject that is ending
-
pageRef
public void pageRef()Process a pageRef.- Overrides:
pageRefin classFOEventHandler
-
startFootnote
Process the start of a footnote.- Overrides:
startFootnotein classFOEventHandler- Parameters:
footnote- Footnote that is starting
-
endFootnote
Process the ending of a footnote.- Overrides:
endFootnotein classFOEventHandler- Parameters:
footnote- Footnote that is ending
-
startFootnoteBody
Process the start of a footnote body.- Overrides:
startFootnoteBodyin classFOEventHandler- Parameters:
body- FootnoteBody that is starting
-
endFootnoteBody
Process the ending of a footnote body.- Overrides:
endFootnoteBodyin classFOEventHandler- Parameters:
body- FootnoteBody that is ending
-
startLeader
Process the start of a Leader.- Overrides:
startLeaderin classFOEventHandler- Parameters:
l- Leader that is starting
-
text
- Parameters:
text- FOText objectcharacters- CharSequence of the characters to process.
-
startPageNumber
- Overrides:
startPageNumberin classFOEventHandler- Parameters:
pagenum- PageNumber that is starting.
-
endPageNumber
- Overrides:
endPageNumberin classFOEventHandler- Parameters:
pagenum- PageNumber that is ending.
-
startPageNumberCitation
- Overrides:
startPageNumberCitationin classFOEventHandler- Parameters:
l- PageNumberCitation that is starting.
-
startPageNumberCitationLast
- Overrides:
startPageNumberCitationLastin classFOEventHandler- Parameters:
l- PageNumberCitationLast that is starting.
-
endContainer
Closes any mismatched tags that are detected in the RTF structure.- Parameters:
containerClass- The class representing the tag to close.- Returns:
- Determines whether the tag mismatch has been handled.
-