Class AbstractPDFImageHandler

java.lang.Object
org.apache.fop.render.pdf.AbstractPDFImageHandler
All Implemented Interfaces:
ImageHandler, ImageHandlerBase
Direct Known Subclasses:
PDFImageHandlerRawCCITTFax, PDFImageHandlerRawJPEG, PDFImageHandlerRawPNG, PDFImageHandlerRenderedImage

abstract class AbstractPDFImageHandler extends Object implements ImageHandler
A partial implementation of a PDF-specific image handler, containing the code that is common between image flavors.
  • Constructor Details

    • AbstractPDFImageHandler

      AbstractPDFImageHandler()
  • Method Details

    • handleImage

      public void handleImage(RenderingContext context, org.apache.xmlgraphics.image.loader.Image image, Rectangle pos) throws 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:
      IOException - if an I/O error occurs
    • createPDFImage

      abstract PDFImage createPDFImage(org.apache.xmlgraphics.image.loader.Image image, 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