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 HorizontalAlignmentGets horizontal alignment.final LengthGets horizontal offset.final StringgetHtml()Gets html.final StringGets hyperlink.final LengthGets the maximum height of the output stamp.final LengthGets the maximum width of the output stamp.final LengthGets the minimum height of the output stamp.final LengthGets the minimum width of the output stamp.final intGets opacity.final intGets rotation.final doublegetScale()Gets scale.final VerticalAlignmentGets vertical alignment.final LengthGets vertical offset.final booleanIs stamp behind content boolean.final voidSets horizontal alignment.final voidsetHorizontalOffset(Length value) Sets horizontal offset.final voidSets html.final voidsetHyperlink(String value) Sets hyperlink.final voidsetMaxHeight(Length value) Sets the maximum height of the output stamp.final voidsetMaxWidth(Length value) Sets the maximum width of the output stamp.final voidsetMinHeight(Length value) Sets the minimum height of the output stamp.final voidsetMinWidth(Length value) Sets the minimum width of the output stamp.final voidsetOpacity(int value) Sets opacity.final voidsetRotation(int value) Sets rotation.final voidsetScale(double value) Sets scale.final voidsetStampBehindContent(boolean value) Sets stamp behind content.final voidSets vertical alignment.final voidsetVerticalOffset(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
-