public class Java2DDocumentHandler extends Object implements IFDocumentHandler
IFDocumentHandler implementation that produces
Graphics2D instance.| Constructor and Description |
|---|
Java2DDocumentHandler() |
| 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.
|
String |
getMimeType()
Returns the MIME type of the output format that is generated by this implementation.
|
StructureTreeEventHandler |
getStructureTreeEventHandler() |
void |
handleExtensionObject(Object extension)
Handles an extension object.
|
void |
setContext(IFContext context) |
void |
setDefaultFontInfo(FontInfo fontInfo)
Sets the default font set (with no custom configuration).
|
void |
setDocumentLocale(Locale locale) |
void |
setFontInfo(FontInfo fontInfo)
Sets the font set to work with.
|
void |
setResult(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,
String name,
String pageMasterName,
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(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.
|
public void setContext(IFContext context)
public IFContext getContext()
IFDocumentHandlergetContext in interface IFDocumentHandlerpublic void setResult(Result result) throws IFException
IFDocumentHandlersetResult in interface IFDocumentHandlerresult - the JAXP Result object to receive the generated contentIFException - if an error occurs setting up the outputpublic void setFontInfo(FontInfo fontInfo)
IFDocumentHandlersetFontInfo in interface IFDocumentHandlerfontInfo - the font info objectpublic FontInfo getFontInfo()
IFDocumentHandlergetFontInfo in interface IFDocumentHandlerpublic void setDefaultFontInfo(FontInfo fontInfo)
IFDocumentHandlersetDefaultFontInfo in interface IFDocumentHandlerfontInfo - the font info object to populatepublic IFDocumentHandlerConfigurator getConfigurator()
IFDocumentHandlergetConfigurator in interface IFDocumentHandlerpublic StructureTreeEventHandler getStructureTreeEventHandler()
getStructureTreeEventHandler in interface IFDocumentHandlerpublic IFDocumentNavigationHandler getDocumentNavigationHandler()
IFDocumentHandlergetDocumentNavigationHandler in interface IFDocumentHandlerpublic boolean supportsPagesOutOfOrder()
IFDocumentHandlersupportsPagesOutOfOrder in interface IFDocumentHandlerpublic String getMimeType()
IFDocumentHandlergetMimeType in interface IFDocumentHandlerpublic void startDocument()
throws IFException
IFDocumentHandlerstartDocument in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endDocument()
throws IFException
IFDocumentHandlerendDocument in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void setDocumentLocale(Locale locale)
setDocumentLocale in interface IFDocumentHandlerlocale - Locale of the document.public void startDocumentHeader()
throws IFException
IFDocumentHandlerIFDocumentHandler.startDocument() method. Extensions sent to this painter between
IFDocumentHandler.startDocumentHeader() and IFDocumentHandler.endDocumentHeader() apply to the document as
a whole (like document metadata).startDocumentHeader in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endDocumentHeader()
throws IFException
IFDocumentHandlerendDocumentHeader in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void startDocumentTrailer()
throws IFException
IFDocumentHandlerIFDocumentHandler.startDocumentTrailer() and IFDocumentHandler.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).startDocumentTrailer in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endDocumentTrailer()
throws IFException
IFDocumentHandlerIFDocumentHandler.endDocument() method.endDocumentTrailer in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void startPageSequence(String id) throws IFException
IFDocumentHandlerstartPageSequence in interface IFDocumentHandlerid - the page sequence's identifier (or null if none is available)IFException - if an error occurs while handling this eventpublic void endPageSequence()
throws IFException
IFDocumentHandlerendPageSequence in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void startPage(int index,
String name,
String pageMasterName,
Dimension size)
throws IFException
IFDocumentHandlerstartPage in interface IFDocumentHandlerindex - 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 eventpublic void endPage()
throws IFException
IFDocumentHandlerendPage in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void startPageHeader()
throws IFException
IFDocumentHandlerstartPageHeader in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endPageHeader()
throws IFException
IFDocumentHandlerendPageHeader in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic IFPainter startPageContent() throws IFException
IFDocumentHandlerIFPainter interface
which is used to paint the page contents.startPageContent in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endPageContent()
throws IFException
IFDocumentHandlerIFPainter returned by the
respective IFDocumentHandler.startPageContent() method are illegal.endPageContent in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void startPageTrailer()
throws IFException
IFDocumentHandlerstartPageTrailer in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void endPageTrailer()
throws IFException
IFDocumentHandlerendPageTrailer in interface IFDocumentHandlerIFException - if an error occurs while handling this eventpublic void handleExtensionObject(Object extension) throws IFException
IFDocumentHandlerhandleExtensionObject in interface IFDocumentHandlerextension - the extension objectIFException - if an error occurs while handling this eventCopyright © 2023 Apache Software Foundation. All rights reserved.