Interface PDFPrintSupport.PDFWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPage​(java.awt.image.BufferedImage pageImage, double xInPoints, double yInPoints, double widthInPoints, double heightInPoints)
      Adds a new page that consists of a single image.
      void close()
      Closes the PDF file once all pages have been added.
      void setConfiguration​(PDFPrintSupport.Configuration config)
      Sets the configuration information to be used by this writer to create a PDF file.
    • Method Detail

      • setConfiguration

        void setConfiguration​(PDFPrintSupport.Configuration config)
                       throws java.io.IOException
        Sets the configuration information to be used by this writer to create a PDF file.
        Parameters:
        config - configuration details that describe the destination, page size, and basic metadata
        Throws:
        java.io.IOException - if an I/O error occurs while initializing the PDF file
      • addPage

        void addPage​(java.awt.image.BufferedImage pageImage,
                     double xInPoints,
                     double yInPoints,
                     double widthInPoints,
                     double heightInPoints)
              throws java.io.IOException
        Adds a new page that consists of a single image.
        Parameters:
        pageImage - an image to be drawn on the page
        xInPoints - the x-offset at which to draw the image
        yInPoints - the y-offset at which to draw the image
        widthInPoints - the width of the image
        heightInPoints - the height of the image
        Throws:
        java.io.IOException - if an I/O error occurs while adding the page
      • close

        void close()
            throws java.io.IOException
        Closes the PDF file once all pages have been added.
        Throws:
        java.io.IOException - if an I/O error occurs while finishing the PDF file