TextStamp

Inheritance: java.lang.Object, com.aspose.pdf.Stamp

public class TextStamp extends Stamp

Reresents textual stamp.

Constructors

Constructor Description
TextStamp(String value) Initializes a new instance of the TextStamp class.
TextStamp(String value, TextState textState) Initializes a new instance of the TextStamp class.
TextStamp(FormattedText formattedText) Initializes a new instance of the TextStamp class with formattedText object

Methods

Method Description
equals(Object arg0)
getBottomMargin() Gets bottom margin of stamp.
getClass()
getDefaultFont() Returns default font
getDefaultFontSize() Default Font Size
getDraw() This property determines how stamp is drawn on page.
getHeight() Desired height of the stamp on the page.
getHorizontalAlignment() Gets horizontal alignment of stamp on the page.
getLeftMargin() Gets left margin of stamp.
getMaxRowWidth() Max row height for WordWrap option.
getOpacity() Gets a value to indicate the stamp opacity.
getOutlineOpacity() Gets a value to indicate the stamp outline opacity.
getOutlineWidth() Gets a value of the stamp outline width.
getRightMargin() Gets right margin of stamp.
getRotate() Gets the rotation of stamp content according Rotation values.
getRotateAngle() Gets rotate angle of stamp in degrees.
getStampId() Gets stamp ID.
getTextAlignment() Alignment of the text inside the stamp.
getTextState() Gets text properties of the stamp.
getTopMargin() Get top margin of stamp.
getTreatYIndentAsBaseLine() Defines coordinate origin for placing text.
getValue() Gets string value which is used as stamp on the page.
getVerticalAlignment() Gets vertical alignment of stamp on page.
getWidth() Desired width of the stamp on the page.
getXIndent() Get horizontal stamp coordinate, starting from the left.
getYIndent() Get vertical stamp coordinate, starting from the bottom.
getZoom() Gets zooming factor of the stamp.
getZoomX() Gets horizontal zooming factor of the stamp.
getZoomY() Gets vertical zooming factor of the stamp.
hashCode()
isBackground() Gets a bool value that indicates the content is stamped as background.
isJustify() Defines text justification.
isScale() Defines scaling of the text.
isWordWrap() Defines word wrap.
notify()
notifyAll()
put(Page page) Adds textual stamp on the page.
setBackground(boolean value) Sets a bool value that indicates the content is stamped as background.
setBottomMargin(double value) Sets bottom margin of stamp.
setDraw(boolean value) This property determines how stamp is drawn on page.
setHeight(double value) Desired height of the stamp on the page.
setHorizontalAlignment(int value) Sets Horizontal alignment of stamp on the page.
setJustify(boolean value) Defines text justification.
setLeftMargin(double value) Sets left margin of stamp.
setMaxRowWidth(double value) Max row height for WordWrap option.
setOpacity(double value) Sets a value to indicate the stamp opacity.
setOutlineOpacity(double value) Sets a value to indicate the stamp outline opacity.
setOutlineWidth(double value) Sets a value of the stamp outline width.
setRightMargin(double value) Sets right margin of stamp.
setRotate(int value) Sets the rotation of stamp content according Rotation values.
setRotateAngle(double value) Sets rotate angle of stamp in degrees.
setScale(boolean value) Defines scaling of the text.
setStampId(int value) Sets stamp Id.
setTextAlignment(int value) Alignment of the text inside the stamp.
setTopMargin(double value) Sets top margin of stamp.
setTreatYIndentAsBaseLine(boolean value) Defines coordinate origin for placing text.
setValue(String value) Sets string value which is used as stamp on the page.
setVerticalAlignment(int value) Sets vertical alignment of stamp on page.
setWidth(double value) Desired width of the stamp on the page.
setWordWrap(boolean value) Defines word wrap.
setXIndent(double value) Set horizontal stamp coordinate, starting from the left.
setYIndent(double value) Set vertical stamp coordinate, starting from the bottom.
setZoom(double value) Gets zooming factor of the stamp.
setZoomX(double value) Sets horizontal zooming factor of the stamp.
setZoomY(double value) Sets vertical zooming factor of the stamp.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

TextStamp(String value)

public TextStamp(String value)

Initializes a new instance of the TextStamp class.

Parameters:

Parameter Type Description
value java.lang.String Stamp value.

TextStamp(String value, TextState textState)

public TextStamp(String value, TextState textState)

Initializes a new instance of the TextStamp class.

Parameters:

Parameter Type Description
value java.lang.String Stamp value.
textState TextState Stamp text state.

TextStamp(FormattedText formattedText)

public TextStamp(FormattedText formattedText)

Initializes a new instance of the TextStamp class with formattedText object

Parameters:

Parameter Type Description
formattedText FormattedText FormattedText object which contains text of the stamp.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getBottomMargin()

public double getBottomMargin()

Gets bottom margin of stamp.

Returns: double - double value

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDefaultFont()

public static Font getDefaultFont()

Returns default font

Returns: Font - com.aspose.pdf.Font object

getDefaultFontSize()

public static float getDefaultFontSize()

Default Font Size

Returns: float - float value

getDraw()

public boolean getDraw()

This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text.

Returns: boolean - boolean value

getHeight()

public double getHeight()

Desired height of the stamp on the page.

Returns: double - double value

getHorizontalAlignment()

public int getHorizontalAlignment()

Gets horizontal alignment of stamp on the page.

Returns: int - HorizontalAlignment value

getLeftMargin()

public double getLeftMargin()

Gets left margin of stamp.

Returns: double - double value

getMaxRowWidth()

public double getMaxRowWidth()

Max row height for WordWrap option.

Returns: double - double 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 - 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 - double value

getOutlineWidth()

public double getOutlineWidth()

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

Returns: double - double value

getRightMargin()

public double getRightMargin()

Gets right margin of stamp.

Returns: double - 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: int - Rotation value

getRotateAngle()

public double getRotateAngle()

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

Returns: double - double value

getStampId()

public int getStampId()

Gets stamp ID.

Returns: int - Identifier of the stamp.

getTextAlignment()

public int getTextAlignment()

Alignment of the text inside the stamp.

Returns: int - HorizontalAlignment value

getTextState()

public TextState getTextState()

Gets text properties of the stamp. See TextState for details.

Returns: TextState - TextState element

getTopMargin()

public double getTopMargin()

Get top margin of stamp.

Returns: double - double value

getTreatYIndentAsBaseLine()

public boolean getTreatYIndentAsBaseLine()

Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text.

Returns: boolean - boolean value

getValue()

public String getValue()

Gets string value which is used as stamp on the page.

Returns: java.lang.String - String value

getVerticalAlignment()

public int getVerticalAlignment()

Gets vertical alignment of stamp on page.

Returns: int - VerticalAlignment value

getWidth()

public double getWidth()

Desired width of the stamp on the page.

Returns: double - double value

getXIndent()

public double getXIndent()

Get horizontal stamp coordinate, starting from the left.

Returns: double - double value

getYIndent()

public double getYIndent()

Get vertical stamp coordinate, starting from the bottom.

Returns: double - 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 - double value

getZoomX()

public double getZoomX()

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

Returns: double - double value

getZoomY()

public double getZoomY()

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

Returns: double - double value

hashCode()

public native int hashCode()

Returns: int

isBackground()

public boolean isBackground()

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 - boolean value

isJustify()

public boolean isJustify()

Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false.

Returns: boolean - boolean value

isScale()

public boolean isScale()

Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width.

Returns: boolean - boolean value

isWordWrap()

public boolean isWordWrap()

Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false.

Returns: boolean - boolean value

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

put(Page page)

public void put(Page page)

Adds textual stamp on the page.

Parameters:

Parameter Type Description
page Page Page for stamping.

setBackground(boolean value)

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 default, the value is false, the stamp content is layed at the top.

Parameters:

Parameter Type Description
value boolean boolean value

setBottomMargin(double value)

public void setBottomMargin(double value)

Sets bottom margin of stamp.

Parameters:

Parameter Type Description
value double double value

setDraw(boolean value)

public void setDraw(boolean value)

This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text.

Parameters:

Parameter Type Description
value boolean boolean value

setHeight(double value)

public void setHeight(double value)

Desired height of the stamp on the page.

Parameters:

Parameter Type Description
value double double value

setHorizontalAlignment(int value)

public void setHorizontalAlignment(int value)

Sets Horizontal alignment of stamp on the page.

Parameters:

Parameter Type Description
value int HorizontalAlignment value

setJustify(boolean value)

public void setJustify(boolean value)

Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false.

Parameters:

Parameter Type Description
value boolean boolean value

setLeftMargin(double value)

public void setLeftMargin(double value)

Sets left margin of stamp.

Parameters:

Parameter Type Description
value double double value

setMaxRowWidth(double value)

public void setMaxRowWidth(double value)

Max row height for WordWrap option.

Parameters:

Parameter Type Description
value double double value

setOpacity(double value)

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:

Parameter Type Description
value double double value

setOutlineOpacity(double value)

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:

Parameter Type Description
value double double value

setOutlineWidth(double value)

public void setOutlineWidth(double value)

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

Parameters:

Parameter Type Description
value double double value

setRightMargin(double value)

public void setRightMargin(double value)

Sets right margin of stamp.

Parameters:

Parameter Type Description
value double double value

setRotate(int value)

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:

Parameter Type Description
value int int value

setRotateAngle(double value)

public void setRotateAngle(double value)

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

Parameters:

Parameter Type Description
value double rotate angle

setScale(boolean value)

public void setScale(boolean value)

Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width.

Parameters:

Parameter Type Description
value boolean boolean value

setStampId(int value)

public void setStampId(int value)

Sets stamp Id.

Parameters:

Parameter Type Description
value int New value of Stamp ID.

setTextAlignment(int value)

public void setTextAlignment(int value)

Alignment of the text inside the stamp.

Parameters:

Parameter Type Description
value int HorizontalAlignment value

setTopMargin(double value)

public void setTopMargin(double value)

Sets top margin of stamp.

Parameters:

Parameter Type Description
value double double value

setTreatYIndentAsBaseLine(boolean value)

public void setTreatYIndentAsBaseLine(boolean value)

Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text.

Parameters:

Parameter Type Description
value boolean boolean value

setValue(String value)

public void setValue(String value)

Sets string value which is used as stamp on the page.

Parameters:

Parameter Type Description
value java.lang.String String value

setVerticalAlignment(int value)

public void setVerticalAlignment(int value)

Sets vertical alignment of stamp on page.

Parameters:

Parameter Type Description
value int VerticalAlignment value

setWidth(double value)

public void setWidth(double value)

Desired width of the stamp on the page.

Parameters:

Parameter Type Description
value double double value

setWordWrap(boolean value)

public void setWordWrap(boolean value)

Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false.

Parameters:

Parameter Type Description
value boolean boolean value

setXIndent(double value)

public void setXIndent(double value)

Set horizontal stamp coordinate, starting from the left.

Parameters:

Parameter Type Description
value double double value

setYIndent(double value)

public void setYIndent(double value)

Set vertical stamp coordinate, starting from the bottom.

Parameters:

Parameter Type Description
value double double value

setZoom(double value)

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:

Parameter Type Description
value double double value

setZoomX(double value)

public void setZoomX(double value)

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

Parameters:

Parameter Type Description
value double double value

setZoomY(double value)

public void setZoomY(double value)

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

Parameters:

Parameter Type Description
value double double value

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int