Package com.ironsoftware.ironpdf.stamp
Class Stamper
- java.lang.Object
-
- com.ironsoftware.ironpdf.stamp.Stamper
-
- Direct Known Subclasses:
BarcodeStamper
,HtmlStamper
,ImageStamper
,TextStamper
public abstract class Stamper extends Object
Defines a PDF Stamper.PdfDocument.applyStamp(Stamper)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalAlignment
getHorizontalAlignment()
Gets horizontal alignment.Length
getHorizontalOffset()
Gets horizontal offset.String
getHtml()
Gets html.String
getHyperlink()
Gets hyperlink.Length
getMaxHeight()
Gets the maximum height of the output stamp.Length
getMaxWidth()
Gets the maximum width of the output stamp.Length
getMinHeight()
Gets the minimum height of the output stamp.Length
getMinWidth()
Gets the minimum width of the output stamp.int
getOpacity()
Gets opacity.int
getRotation()
Gets rotation.double
getScale()
Gets scale.VerticalAlignment
getVerticalAlignment()
Gets vertical alignment.Length
getVerticalOffset()
Gets vertical offset.WaitFor
getWaitFor()
Get A convenient wrapper to wait for various events, or just wait for amount of time.boolean
isStampBehindContent()
Is stamp behind content boolean.void
setHorizontalAlignment(HorizontalAlignment value)
Sets horizontal alignment.void
setHorizontalOffset(Length value)
Sets horizontal offset.void
setHtml(String value)
Sets html.void
setHyperlink(String value)
Sets hyperlink.void
setMaxHeight(Length value)
Sets the maximum height of the output stamp.void
setMaxWidth(Length value)
Sets the maximum width of the output stamp.void
setMinHeight(Length value)
Sets the minimum height of the output stamp.void
setMinWidth(Length value)
Sets the minimum width of the output stamp.void
setOpacity(int value)
Sets opacity.void
setRotation(int value)
Sets rotation.void
setScale(double value)
Sets scale.void
setStampBehindContent(boolean value)
Sets stamp behind content.void
setVerticalAlignment(VerticalAlignment value)
Sets vertical alignment.void
setVerticalOffset(Length value)
Sets vertical offset.void
setWaitFor(WaitFor waitFor)
Set A convenient wrapper to wait for various events, or just wait for amount of time.
-
-
-
Method Detail
-
getHtml
public final String getHtml()
Gets html. The HTML fragment which will be stamped onto your PDF. All external references to JavaScript, CSS, and image files will be relative to HtmlBaseUrl.- Returns:
- the html
-
setHtml
public final void setHtml(String value)
Sets html. The HTML fragment which will be stamped onto your PDF. All external references to JavaScript, CSS, and image files will be relative to HtmlBaseUrl.- Parameters:
value
- the value
-
getOpacity
public final int getOpacity()
Gets opacity. Allows the stamp to be transparent. 0 is fully invisible, 100 if fully opaque.- Returns:
- the opacity
-
setOpacity
public final void setOpacity(int value)
Sets opacity. Allows the stamp to be transparent. 0 is fully invisible, 100 if fully opaque.- Parameters:
value
- the value
-
getRotation
public final int getRotation()
Gets rotation. Rotates the stamp clockwise from 0 to 360 degrees as specified.- Returns:
- the rotation
-
setRotation
public final void setRotation(int value)
Sets rotation. Rotates the stamp clockwise from 0 to 360 degrees as specified.- Parameters:
value
- the value
-
getHorizontalAlignment
public final HorizontalAlignment getHorizontalAlignment()
Gets horizontal alignment. The horizontal alignment of the stamp relative to the page.- Returns:
- the horizontal alignment
-
setHorizontalAlignment
public final void setHorizontalAlignment(HorizontalAlignment value)
Sets horizontal alignment. The horizontal alignment of the stamp relative to the page.- Parameters:
value
- the value
-
getVerticalAlignment
public final VerticalAlignment getVerticalAlignment()
Gets vertical alignment. The vertical alignment of the stamp relative to the page.- Returns:
- the vertical alignment
-
setVerticalAlignment
public final void setVerticalAlignment(VerticalAlignment value)
Sets vertical alignment. The vertical alignment of the stamp relative to the page.- Parameters:
value
- the value
-
getHorizontalOffset
public final Length getHorizontalOffset()
Gets horizontal offset. The horizontal offset. Default value is 0, and default unit isMeasurementUnit.PERCENTAGE
. Value of 0 has no effect. Positive indicates an offset to the right direction. Negative indicates an offset to the left direction.- Returns:
- the horizontal offset
-
setHorizontalOffset
public final void setHorizontalOffset(Length value)
Sets horizontal offset. The horizontal offset. Default value is 0, and default unit isMeasurementUnit.PERCENTAGE
. Value of 0 has no effect. Positive indicates an offset to the right direction. Negative indicates an offset to the left direction.- Parameters:
value
- the value
-
getVerticalOffset
public final Length getVerticalOffset()
Gets vertical offset. The horizontal offset. Default value is 0, and default unit isMeasurementUnit.PERCENTAGE
. Value of 0 has no effect. Positive indicates an offset in the downward direction. Negative indicates an offset in the upward direction.- Returns:
- the vertical offset
-
setVerticalOffset
public final void setVerticalOffset(Length value)
Sets vertical offset. The horizontal offset. Default value is 0, and default unit isMeasurementUnit.PERCENTAGE
. Value of 0 has no effect. Positive indicates an offset in the downward direction. Negative indicates an offset in the upward direction.- Parameters:
value
- the value
-
getMaxWidth
public final Length getMaxWidth()
Gets the maximum width of the output stamp.- Returns:
- the max width
-
setMaxWidth
public final void setMaxWidth(Length value)
Sets the maximum width of the output stamp.- Parameters:
value
- the value
-
getMaxHeight
public final Length getMaxHeight()
Gets the maximum height of the output stamp.- Returns:
- the max height
-
setMaxHeight
public final void setMaxHeight(Length value)
Sets the maximum height of the output stamp.- Parameters:
value
- the value
-
getMinWidth
public final Length getMinWidth()
Gets the minimum width of the output stamp.- Returns:
- the min width
-
setMinWidth
public final void setMinWidth(Length value)
Sets the minimum width of the output stamp.- Parameters:
value
- the value
-
getMinHeight
public final Length getMinHeight()
Gets the minimum height of the output stamp.- Returns:
- the min height
-
setMinHeight
public final void setMinHeight(Length value)
Sets the minimum height of the output stamp.- Parameters:
value
- the value
-
getHyperlink
public final String getHyperlink()
Gets hyperlink. Makes stamped elements of this Stamper have an on-click hyperlink. Note: HTML links created by <a href=''> tags are not reserved by stamping.- Returns:
- the hyperlink
-
setHyperlink
public final void setHyperlink(String value)
Sets hyperlink. Makes stamped elements of this Stamper have an on-click hyperlink. Note: HTML links created by <a href=''> tags are not reserved by stamping.- Parameters:
value
- the value
-
getScale
public final double getScale()
Gets scale. Applies a percentage scale to the stamps to be larger or smaller. Default is 100 (Percent) which has no effect.- Returns:
- the scale
-
setScale
public final void setScale(double value)
Sets scale. Applies a percentage scale to the stamps to be larger or smaller. Default is 100 (Percent) which has no effect.- Parameters:
value
- the value
-
isStampBehindContent
public final boolean isStampBehindContent()
Is stamp behind content boolean. Set to true for apply stamp behind the content. If the content is opaque, the stamp may be invisible.- Returns:
- the boolean
-
setStampBehindContent
public final void setStampBehindContent(boolean value)
Sets stamp behind content. Set to true for apply stamp behind the content. If the content is opaque, the stamp may be invisible.- Parameters:
value
- the value
-
getWaitFor
public WaitFor getWaitFor()
Get A convenient wrapper to wait for various events, or just wait for amount of time.
-
setWaitFor
public void setWaitFor(WaitFor waitFor)
Set A convenient wrapper to wait for various events, or just wait for amount of time.
-
-