Package com.ironsoftware.ironpdf.stamp
Class Stamper
java.lang.Object
com.ironsoftware.ironpdf.stamp.Stamper
- Direct Known Subclasses:
BarcodeStamper
,HtmlStamper
,ImageStamper
,TextStamper
Defines a PDF Stamper.
PdfDocument.applyStamp(Stamper)
-
Method Summary
Modifier and TypeMethodDescriptionfinal HorizontalAlignment
Gets horizontal alignment.final Length
Gets horizontal offset.final String
getHtml()
Gets html.final String
Gets hyperlink.final Length
Gets the maximum height of the output stamp.final Length
Gets the maximum width of the output stamp.final Length
Gets the minimum height of the output stamp.final Length
Gets the minimum width of the output stamp.final int
Gets opacity.final int
Gets rotation.final double
getScale()
Gets scale.final VerticalAlignment
Gets vertical alignment.final Length
Gets vertical offset.final boolean
Is stamp behind content boolean.final void
Sets horizontal alignment.final void
setHorizontalOffset
(Length value) Sets horizontal offset.final void
Sets html.final void
setHyperlink
(String value) Sets hyperlink.final void
setMaxHeight
(Length value) Sets the maximum height of the output stamp.final void
setMaxWidth
(Length value) Sets the maximum width of the output stamp.final void
setMinHeight
(Length value) Sets the minimum height of the output stamp.final void
setMinWidth
(Length value) Sets the minimum width of the output stamp.final void
setOpacity
(int value) Sets opacity.final void
setRotation
(int value) Sets rotation.final void
setScale
(double value) Sets scale.final void
setStampBehindContent
(boolean value) Sets stamp behind content.final void
Sets vertical alignment.final void
setVerticalOffset
(Length value) Sets vertical offset.
-
Method Details
-
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
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
Gets horizontal alignment. The horizontal alignment of the stamp relative to the page.- Returns:
- the horizontal alignment
-
setHorizontalAlignment
Sets horizontal alignment. The horizontal alignment of the stamp relative to the page.- Parameters:
value
- the value
-
getVerticalAlignment
Gets vertical alignment. The vertical alignment of the stamp relative to the page.- Returns:
- the vertical alignment
-
setVerticalAlignment
Sets vertical alignment. The vertical alignment of the stamp relative to the page.- Parameters:
value
- the value
-
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
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
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
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
Gets the maximum width of the output stamp.- Returns:
- the max width
-
setMaxWidth
Sets the maximum width of the output stamp.- Parameters:
value
- the value
-
getMaxHeight
Gets the maximum height of the output stamp.- Returns:
- the max height
-
setMaxHeight
Sets the maximum height of the output stamp.- Parameters:
value
- the value
-
getMinWidth
Gets the minimum width of the output stamp.- Returns:
- the min width
-
setMinWidth
Sets the minimum width of the output stamp.- Parameters:
value
- the value
-
getMinHeight
Gets the minimum height of the output stamp.- Returns:
- the min height
-
setMinHeight
Sets the minimum height of the output stamp.- Parameters:
value
- the value
-
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
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
-