Class ImageStamper

java.lang.Object
com.ironsoftware.ironpdf.stamp.Stamper
com.ironsoftware.ironpdf.stamp.ImageStamper

public class ImageStamper extends Stamper
This allows the user to edit an existing PDF by adding an image. A subclass of Stamper. Defines an Image PDF Stamper. PdfDocument.applyStamp(Stamper, PageSelection)
  • Constructor Details

    • ImageStamper

      public ImageStamper(String imagePath) throws IOException
      Initializes a new instance of the ImageStamper class.
      Parameters:
      imagePath - The path of the image to be stamped by this stamper
      Throws:
      IOException - the io exception
    • ImageStamper

      public ImageStamper(Path imagePath) throws IOException
      Initializes a new instance of the ImageStamper class.
      Parameters:
      imagePath - The uri of the image to be stamped by this stamper
      Throws:
      IOException - the io exception
    • ImageStamper

      public ImageStamper(byte[] imageBytes)
      Initializes a new instance of the ImageStamper class.
      Parameters:
      imageBytes - The uri of the image to be stamped by this stamper
    • ImageStamper

      public ImageStamper(BufferedImage bufferedImage) throws IOException
      Initializes a new instance of the ImageStamper class.
      Parameters:
      bufferedImage - The BufferedImage object
      Throws:
      IOException - the io exception
  • Method Details

    • getImageData

      public final byte[] getImageData()
      Gets image data (byte[]).
      Returns:
      the image byte[]