Class AbstractPDFImageHandler

    • Constructor Detail

      • AbstractPDFImageHandler

        AbstractPDFImageHandler()
    • Method Detail

      • handleImage

        public void handleImage​(RenderingContext context,
                                org.apache.xmlgraphics.image.loader.Image image,
                                java.awt.Rectangle pos)
                         throws java.io.IOException
        Handles the given Image instance painting it at the indicated position in the output format being generated.
        Specified by:
        handleImage in interface ImageHandler
        Parameters:
        context - the rendering context
        image - the image to be handled
        pos - the position and scaling of the image relative to the origin point of the current viewport (in millipoints)
        Throws:
        java.io.IOException - if an I/O error occurs
      • createPDFImage

        abstract PDFImage createPDFImage​(org.apache.xmlgraphics.image.loader.Image image,
                                         java.lang.String xobjectKey)
        Creates a PDF image object out of the given image.
        Parameters:
        image - an image
        xobjectKey - a key for retrieval of the image from the document's XObject collection
        Returns:
        a suitable PDFImage implementation that can handle the flavour of the given image