Class PCLDocumentHandler

    • Field Detail

      • pclUtil

        protected PCLRenderingUtil pclUtil
        Utility class for handling all sorts of peripheral tasks around PCL generation.
      • SRC_TRANSPARENCY

        public static final org.apache.xmlgraphics.util.QName SRC_TRANSPARENCY
        Source transparency mode
      • DISABLE_CLIPPING

        public static final java.lang.Object DISABLE_CLIPPING
        Disable clipping
      • COLOR_CANVAS

        public static final java.lang.Object COLOR_CANVAS
        Enables/Disables a color canvas for bitmap production (required for SVG, for example)
    • Constructor Detail

      • PCLDocumentHandler

        public PCLDocumentHandler​(IFContext context)
        Default constructor.
    • 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
      • getResolution

        protected int getResolution()
        Returns:
        the target resolution
      • 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
      • 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