public interface IFDocumentHandler
Call sequence:
startDocument() [setDocumentLocale()] startDocumentHeader() [handleExtension()]* endDocumentHeader() [ startPageSequence() [ startPage() startPageHeader() [handleExtension()]* endPageHeader() startPageContent() (#box)+ endPageContent() startPageTrailer() (addTarget())* endPageTrailer() endPage() ]* endPageSequence() ]* startDocumentTrailer() [handleExtension()]* endDocumentTrailer() endDocument() #box: startBox() (#pageContent)+ endBox() | startViewport() (#pageContext)+ endViewport() #pageContent: ( setFont() | drawText() | drawRect() | drawImage() | TODO etc. etc. | handleExtensionObject() )
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
Indicates the end of a document.
|
void |
endDocumentHeader()
Indicates the end of the document header.
|
void |
endDocumentTrailer()
Indicates the end of the document trailer.
|
void |
endPage()
Indicates the end of a page
|
void |
endPageContent()
Indicates the end of the page content.
|
void |
endPageHeader()
Indicates the end of the page header.
|
void |
endPageSequence()
Indicates the end of a page sequence.
|
void |
endPageTrailer()
Indicates the end of the page trailer.
|
IFDocumentHandlerConfigurator |
getConfigurator()
Returns the configurator for this document handler, if any.
|
IFContext |
getContext()
Returns the associated intermediate format context object.
|
IFDocumentNavigationHandler |
getDocumentNavigationHandler()
Returns a document navigation handler if this feature is supported.
|
FontInfo |
getFontInfo()
Returns the font set to work with.
|
java.lang.String |
getMimeType()
Returns the MIME type of the output format that is generated by this implementation.
|
StructureTreeEventHandler |
getStructureTreeEventHandler() |
void |
handleExtensionObject(java.lang.Object extension)
Handles an extension object.
|
void |
setDefaultFontInfo(FontInfo fontInfo)
Sets the default font set (with no custom configuration).
|
void |
setDocumentLocale(java.util.Locale locale) |
void |
setFontInfo(FontInfo fontInfo)
Sets the font set to work with.
|
void |
setResult(javax.xml.transform.Result result)
Sets the JAXP Result object to receive the generated content.
|
void |
startDocument()
Indicates the start of a document.
|
void |
startDocumentHeader()
Indicates the start of the document header.
|
void |
startDocumentTrailer()
Indicates the start of the document trailer.
|
void |
startPage(int index,
java.lang.String name,
java.lang.String pageMasterName,
java.awt.Dimension size)
Indicates the start of a new page.
|
IFPainter |
startPageContent()
Indicates the start of the page content.
|
void |
startPageHeader()
Indicates the start of the page header.
|
void |
startPageSequence(java.lang.String id)
Indicates the start of a new page sequence.
|
void |
startPageTrailer()
Indicates the start of the page trailer.
|
boolean |
supportsPagesOutOfOrder()
Indicates whether the painter supports to handle the pages in mixed order rather than
ascending order.
|
IFContext getContext()
void setResult(javax.xml.transform.Result result) throws IFException
result
- the JAXP Result object to receive the generated contentIFException
- if an error occurs setting up the outputvoid setFontInfo(FontInfo fontInfo)
fontInfo
- the font info objectFontInfo getFontInfo()
void setDefaultFontInfo(FontInfo fontInfo)
fontInfo
- the font info object to populateIFDocumentHandlerConfigurator getConfigurator()
StructureTreeEventHandler getStructureTreeEventHandler()
IFDocumentNavigationHandler getDocumentNavigationHandler()
boolean supportsPagesOutOfOrder()
java.lang.String getMimeType()
void startDocument() throws IFException
IFException
- if an error occurs while handling this eventvoid endDocument() throws IFException
IFException
- if an error occurs while handling this eventvoid setDocumentLocale(java.util.Locale locale)
locale
- Locale of the document.void startDocumentHeader() throws IFException
startDocument()
method. Extensions sent to this painter between
startDocumentHeader()
and endDocumentHeader()
apply to the document as
a whole (like document metadata).IFException
- if an error occurs while handling this eventvoid endDocumentHeader() throws IFException
IFException
- if an error occurs while handling this eventvoid startDocumentTrailer() throws IFException
startDocumentTrailer()
and endDocumentTrailer()
apply to the document as
a whole and is used for document-level content that is only known after all pages have
been rendered (like named destinations or the bookmark tree).IFException
- if an error occurs while handling this eventvoid endDocumentTrailer() throws IFException
endDocument()
method.IFException
- if an error occurs while handling this eventvoid startPageSequence(java.lang.String id) throws IFException
id
- the page sequence's identifier (or null if none is available)IFException
- if an error occurs while handling this eventvoid endPageSequence() throws IFException
IFException
- if an error occurs while handling this eventvoid startPage(int index, java.lang.String name, java.lang.String pageMasterName, java.awt.Dimension size) throws IFException
index
- the index of the page (0-based)name
- the page name (usually the formatted page number)pageMasterName
- the name of the simple-page-master that generated this pagesize
- the size of the page (equivalent to the MediaBox in PDF)IFException
- if an error occurs while handling this eventvoid endPage() throws IFException
IFException
- if an error occurs while handling this eventvoid startPageHeader() throws IFException
IFException
- if an error occurs while handling this eventvoid endPageHeader() throws IFException
IFException
- if an error occurs while handling this eventIFPainter startPageContent() throws IFException
IFPainter
interface
which is used to paint the page contents.IFException
- if an error occurs while handling this eventvoid endPageContent() throws IFException
IFPainter
returned by the
respective startPageContent()
method are illegal.IFException
- if an error occurs while handling this eventvoid startPageTrailer() throws IFException
IFException
- if an error occurs while handling this eventvoid endPageTrailer() throws IFException
IFException
- if an error occurs while handling this eventvoid handleExtensionObject(java.lang.Object extension) throws IFException
extension
- the extension objectIFException
- if an error occurs while handling this eventCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.