Class IFDocumentHandlerProxy

    • Constructor Detail

      • IFDocumentHandlerProxy

        public IFDocumentHandlerProxy​(IFDocumentHandler delegate)
        Creates a new proxy instance.
        Parameters:
        delegate - the delegate instance
    • Method Detail

      • supportsPagesOutOfOrder

        public boolean supportsPagesOutOfOrder()
        Indicates whether the painter supports to handle the pages in mixed order rather than ascending order.
        Specified by:
        supportsPagesOutOfOrder in interface IFDocumentHandler
        Returns:
        true if out-of-order handling is supported
      • getMimeType

        public java.lang.String getMimeType()
        Returns the MIME type of the output format that is generated by this implementation.
        Specified by:
        getMimeType in interface IFDocumentHandler
        Returns:
        the MIME type
      • getContext

        public IFContext getContext()
        Returns the associated intermediate format context object.
        Specified by:
        getContext in interface IFDocumentHandler
        Returns:
        the context object
      • setFontInfo

        public void setFontInfo​(FontInfo fontInfo)
        Sets the font set to work with.
        Specified by:
        setFontInfo in interface IFDocumentHandler
        Parameters:
        fontInfo - the font info object
      • setDefaultFontInfo

        public void setDefaultFontInfo​(FontInfo fontInfo)
        Sets the default font set (with no custom configuration).
        Specified by:
        setDefaultFontInfo in interface IFDocumentHandler
        Parameters:
        fontInfo - the font info object to populate
      • setResult

        public void setResult​(javax.xml.transform.Result result)
                       throws IFException
        Sets the JAXP Result object to receive the generated content.
        Specified by:
        setResult in interface IFDocumentHandler
        Parameters:
        result - the JAXP Result object to receive the generated content
        Throws:
        IFException - if an error occurs setting up the output
      • startDocument

        public void startDocument()
                           throws IFException
        Indicates the start of a document. This method may only be called once before any other event method.
        Specified by:
        startDocument in interface IFDocumentHandler
        Throws:
        IFException - if an error occurs while handling this event
      • setDocumentLocale

        public void setDocumentLocale​(java.util.Locale locale)
        Specified by:
        setDocumentLocale in interface IFDocumentHandler
        Parameters:
        locale - Locale of the document.
      • endDocumentHeader

        public void endDocumentHeader()
                               throws IFException
        Indicates the end of the document header. This method is called before the first page sequence.
        Specified by:
        endDocumentHeader in interface IFDocumentHandler
        Throws:
        IFException - if an error occurs while handling this event
      • startPageSequence

        public void startPageSequence​(java.lang.String id)
                               throws IFException
        Indicates the start of a new page sequence.
        Specified by:
        startPageSequence in interface IFDocumentHandler
        Parameters:
        id - the page sequence's identifier (or null if none is available)
        Throws:
        IFException - if an error occurs while handling this event
      • startPage

        public void startPage​(int index,
                              java.lang.String name,
                              java.lang.String pageMasterName,
                              java.awt.Dimension size)
                       throws IFException
        Indicates the start of a new page.
        Specified by:
        startPage in interface IFDocumentHandler
        Parameters:
        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 page
        size - the size of the page (equivalent to the MediaBox in PDF)
        Throws:
        IFException - if an error occurs while handling this event
      • startPageContent

        public IFPainter startPageContent()
                                   throws IFException
        Indicates the start of the page content. The method returns an IFPainter interface which is used to paint the page contents.
        Specified by:
        startPageContent in interface IFDocumentHandler
        Returns:
        the IFPainter for the page content
        Throws:
        IFException - if an error occurs while handling this event
      • startPageTrailer

        public void startPageTrailer()
                              throws IFException
        Indicates the start of the page trailer. The page trailer is used for writing down page elements which are only know after handling the page itself (like PDF targets).
        Specified by:
        startPageTrailer in interface IFDocumentHandler
        Throws:
        IFException - if an error occurs while handling this event
      • endDocument

        public void endDocument()
                         throws IFException
        Indicates the end of a document. This method may only be called once after the whole document has been handled. Implementations can release resources (close streams). It is an error to call any event method after this method.
        Specified by:
        endDocument in interface IFDocumentHandler
        Throws:
        IFException - if an error occurs while handling this event
      • handleExtensionObject

        public void handleExtensionObject​(java.lang.Object extension)
                                   throws IFException
        Handles an extension object. This can be a DOM document or any arbitrary object. If an implementation doesn't know how to handle a particular extension it is simply ignored.
        Specified by:
        handleExtensionObject in interface IFDocumentHandler
        Parameters:
        extension - the extension object
        Throws:
        IFException - if an error occurs while handling this event