com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class Stamp

    • Constructor Summary

      Constructors 
      Constructor and Description
      Stamp() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getBackground()
      Gets a bool value that indicates the content is stamped as background.
      double getBottomMargin()
      Gets bottom margin of stamp.
      double getHeight()
      Gets desired height of the stamp on the page.
      int getHorizontalAlignment()
      Gets horizontal alignment of stamp on the page.
      double getLeftMargin()
      Gets left margin of stamp.
      double getOpacity()
      Gets a value to indicate the stamp opacity.
      double getOutlineOpacity()
      Gets a value to indicate the stamp outline opacity.
      double getOutlineWidth()
      Gets a value of the stamp outline width.
      double getRightMargin()
      Gets right margin of stamp.
      int getRotate()
      Gets the rotation of stamp content according Rotation values.
      double getRotateAngle()
      Gets rotate angle of stamp in degrees.
      int getStampId()
      Gets stamp ID.
      double getTopMargin()
      Get top margin of stamp.
      int getVerticalAlignment()
      Gets vertical alignment of stamp on page.
      double getWidth()
      Gets desired width of the stamp on the page.
      double getXIndent()
      Get horizontal stamp coordinate, starting from the left.
      double getYIndent()
      Get vertical stamp coordinate, starting from the bottom.
      double getZoom()
      Gets zooming factor of the stamp.
      double getZoomX()
      Gets horizontal zooming factor of the stamp.
      double getZoomY()
      Gets vertical zooming factor of the stamp.
      abstract void put(Page page)
      Adds stamp on the page.
      void setBackground(boolean value)
      Sets a bool value that indicates the content is stamped as background.
      void setBottomMargin(double value)
      Sets bottom margin of stamp.
      void setHeight(double value)
      Sets desired height of the stamp on the page.
      void setHorizontalAlignment(int value)
      Sets Horizontal alignment of stamp on the page.
      void setLeftMargin(double value)
      Sets left margin of stamp.
      void setOpacity(double value)
      Sets a value to indicate the stamp opacity.
      void setOutlineOpacity(double value)
      Sets a value to indicate the stamp outline opacity.
      void setOutlineWidth(double value)
      Sets a value of the stamp outline width.
      void setRightMargin(double value)
      Sets right margin of stamp.
      void setRotate(int value)
      Sets the rotation of stamp content according Rotation values.
      void setRotateAngle(double value)
      Sets rotate angle of stamp in degrees.
      void setStampId(int value)
      Sets stamp Id.
      void setTopMargin(double value)
      Sets top margin of stamp.
      void setVerticalAlignment(int value)
      Sets vertical alignment of stamp on page.
      void setWidth(double value)
      Sets desired width of the stamp on the page.
      void setXIndent(double value)
      Set horizontal stamp coordinate, starting from the left.
      void setYIndent(double value)
      Set vertical stamp coordinate, starting from the bottom.
      void setZoom(double value)
      Gets zooming factor of the stamp.
      void setZoomX(double value)
      Sets horizontal zooming factor of the stamp.
      void setZoomY(double value)
      Sets vertical zooming factor of the stamp.
    • Constructor Detail

      • Stamp

        public Stamp()
    • Method Detail

      • getBackground

        public boolean getBackground()

        Gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top.

        Returns:
        boolean value
      • setBackground

        public void setBackground(boolean value)

        Sets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top.

        Parameters:
        value - boolean value
      • getOpacity

        public double getOpacity()

        Gets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.

        Returns:
        double value
      • setOpacity

        public void setOpacity(double value)

        Sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.

        Parameters:
        value - double value
      • getOutlineOpacity

        public double getOutlineOpacity()

        Gets a value to indicate the stamp outline opacity. The value is from 0.0 to 1.0. By default the value is 1.0.

        Returns:
        double value
      • setOutlineOpacity

        public void setOutlineOpacity(double value)

        Sets a value to indicate the stamp outline opacity. The value is from 0.0 to 1.0. By default the value is 1.0.

        Parameters:
        value - double value
      • getOutlineWidth

        public double getOutlineWidth()

        Gets a value of the stamp outline width. By default the value is 1.0.

        Returns:
        double value
      • setOutlineWidth

        public void setOutlineWidth(double value)

        Sets a value of the stamp outline width. By default the value is 1.0.

        Parameters:
        value - double value
      • getRotate

        public int getRotate()

        Gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.

        Returns:
        Rotation value
        See Also:
        Rotation
      • setRotate

        public void setRotate(int value)

        Sets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.

        Parameters:
        value - int value
        See Also:
        Rotation
      • getXIndent

        public double getXIndent()

        Get horizontal stamp coordinate, starting from the left.

        Returns:
        double value
      • setXIndent

        public void setXIndent(double value)

        Set horizontal stamp coordinate, starting from the left.

        Parameters:
        value - double value
      • getYIndent

        public double getYIndent()

        Get vertical stamp coordinate, starting from the bottom.

        Returns:
        double value
      • setYIndent

        public void setYIndent(double value)

        Set vertical stamp coordinate, starting from the bottom.

        Parameters:
        value - double value
      • getHorizontalAlignment

        public int getHorizontalAlignment()

        Gets horizontal alignment of stamp on the page.

        Returns:
        HorizontalAlignment value
        See Also:
        HorizontalAlignment
      • setHorizontalAlignment

        public void setHorizontalAlignment(int value)

        Sets Horizontal alignment of stamp on the page.

        Parameters:
        value - HorizontalAlignment value
        See Also:
        HorizontalAlignment
      • getVerticalAlignment

        public int getVerticalAlignment()

        Gets vertical alignment of stamp on page.

        Returns:
        VerticalAlignment value
        See Also:
        VerticalAlignment
      • setVerticalAlignment

        public void setVerticalAlignment(int value)

        Sets vertical alignment of stamp on page.

        Parameters:
        value - VerticalAlignment value
        See Also:
        VerticalAlignment
      • getLeftMargin

        public double getLeftMargin()

        Gets left margin of stamp.

        Returns:
        double value
      • setLeftMargin

        public void setLeftMargin(double value)

        Sets left margin of stamp.

        Parameters:
        value - double value
      • getRightMargin

        public double getRightMargin()

        Gets right margin of stamp.

        Returns:
        double value
      • setRightMargin

        public void setRightMargin(double value)

        Sets right margin of stamp.

        Parameters:
        value - double value
      • getBottomMargin

        public double getBottomMargin()

        Gets bottom margin of stamp.

        Returns:
        double value
      • setBottomMargin

        public void setBottomMargin(double value)

        Sets bottom margin of stamp.

        Parameters:
        value - double value
      • getTopMargin

        public double getTopMargin()

        Get top margin of stamp.

        Returns:
        double value
      • setTopMargin

        public void setTopMargin(double value)

        Sets top margin of stamp.

        Parameters:
        value - double value
      • getZoomX

        public double getZoomX()

        Gets horizontal zooming factor of the stamp. Allows to scale stamp horizontally.

        Returns:
        double value
      • setZoomX

        public void setZoomX(double value)

        Sets horizontal zooming factor of the stamp. Allows to scale stamp horizontally.

        Parameters:
        value - double value
      • getWidth

        public double getWidth()

        Gets desired width of the stamp on the page.

        Returns:
        double value
      • setWidth

        public void setWidth(double value)

        Sets desired width of the stamp on the page.

        Parameters:
        value - double value
      • getHeight

        public double getHeight()

        Gets desired height of the stamp on the page.

        Returns:
        double value
      • setHeight

        public void setHeight(double value)

        Sets desired height of the stamp on the page.

        Parameters:
        value - double value
      • getZoomY

        public double getZoomY()

        Gets vertical zooming factor of the stamp. Allows to scale stamp vertically.

        Returns:
        double value
      • setZoomY

        public void setZoomY(double value)

        Sets vertical zooming factor of the stamp. Allows to scale stamp vertically.

        Parameters:
        value - double value
      • getZoom

        public double getZoom()

        Gets zooming factor of the stamp. Allows to scale stamp. Please note that pair of properties ZoomX and ZoomY allows to set zoom factor for every axe separately. Setting of this property changes both ZoomX and ZoomY properties. If ZoomX and ZoomY are different then Zoom property returns ZoomX value.

        Returns:
        double value
      • setZoom

        public void setZoom(double value)

        Gets zooming factor of the stamp. Allows to scale stamp. Please note that pair of properties ZoomX and ZoomY allows to set zoom factor for every axe separately. Setting of this property changes both ZoomX and ZoomY properties. If ZoomX and ZoomY are different then Zoom property returns ZoomX value.

        Parameters:
        value - double value
      • getRotateAngle

        public double getRotateAngle()

        Gets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.

        Returns:
        double value
      • setRotateAngle

        public void setRotateAngle(double value)

        Sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.

        Parameters:
        value - rotate angle
      • put

        public abstract void put(Page page)

        Adds stamp on the page.

        Parameters:
        page - The page to add stamp.
      • setStampId

        public void setStampId(int value)

        Sets stamp Id.

        Parameters:
        value - New value of Stamp ID.
      • getStampId

        public int getStampId()

        Gets stamp ID.

        Returns:
        Identifier of the stamp.