Class AFPImageHandler

    • Constructor Detail

      • AFPImageHandler

        public AFPImageHandler()
    • Method Detail

      • generateDataObjectInfo

        public AFPDataObjectInfo generateDataObjectInfo​(AFPRendererImageInfo rendererImageInfo)
                                                 throws java.io.IOException
        Generates an intermediate AFPDataObjectInfo that is later used to construct the appropriate data object in the AFP DataStream.
        Parameters:
        rendererImageInfo - the renderer image info
        Returns:
        a data object info object
        Throws:
        java.io.IOException - thrown if an I/O exception of some sort has occurred.
      • createResourceInformation

        public static AFPResourceInfo createResourceInformation​(java.lang.String uri,
                                                                java.util.Map foreignAttributes)
        Sets resource information on the data object info.
        Parameters:
        uri - the image's URI (or null if no URI is available)
        foreignAttributes - a Map of foreign attributes (or null)
        Returns:
        the resource information object
      • createObjectAreaInfo

        public static AFPObjectAreaInfo createObjectAreaInfo​(AFPPaintingState paintingState,
                                                             java.awt.Rectangle targetRect)
        Creates and returns an AFPObjectAreaInfo instance for the placement of the image.
        Parameters:
        paintingState - the painting state
        targetRect - the target rectangle in which to place the image (coordinates in mpt)
        Returns:
        the newly created object area info instance
      • createDataObjectInfo

        protected abstract AFPDataObjectInfo createDataObjectInfo()
        Creates the data object information object
        Returns:
        the data object information object