|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Watermark
The Watermark
interface defines methods for the creation and manipulation of watermarks.
In addition to the name of the watermark, Watermark
objects must define the text that appears
as the watermark in the documents. The text can be one or more of the following properties:
The following properties can be set to affect the appearance of the watermark:
For information about using this interface as part of creating watermarks using the Document Security Java API, see the Creating a new watermark using the Java API quick start in Programming with Adobe Experience Manager Forms.
Field Summary | |
---|---|
static java.lang.String |
HORIZONTAL_ALIGNMENT_CENTER
Represents center horizontal alignment. |
static java.lang.String |
HORIZONTAL_ALIGNMENT_LEFT
Represents left horizontal alignment. |
static java.lang.String |
HORIZONTAL_ALIGNMENT_RIGHT
Represents right horizontal alignment. |
static java.lang.String |
VERTICAL_ALIGNMENT_BOTTOM
Represents bottom vertical alignment. |
static java.lang.String |
VERTICAL_ALIGNMENT_CENTER
Represents center vertical alignment. |
static java.lang.String |
VERTICAL_ALIGNMENT_TOP
Represents top vertical alignment. |
Method Summary | |
---|---|
java.lang.String |
getCustomText()
Retrieves the custom text that the watermark includes. |
java.lang.String |
getHorizontalAlignment()
Retrieves the horizontal alignment setting for the watermark. |
float |
getHorizontalOffset()
Retrieves the offset of the watermark from the aligned position ( position is specified by alignment @see WatermarkBOConstants ) |
java.lang.String |
getId()
Retrieves the identification of the watermark. |
java.lang.String |
getName()
Retrieves the name of the watermark. |
int |
getOpacity()
Retrieves the opacity of the watermark. |
int |
getRotation()
Retrieves the rotation of the watermark. |
int |
getScale()
Retrieves the size of the watermark font. |
java.lang.String |
getVerticalAlignment()
Retrieves the vertical alignment setting for the watermark. |
float |
getVerticalOffset()
Retrieves the offset of the watermark from the aligned position ( position is specified by alignment ) |
boolean |
isBackground()
Retrieves whether the watermark appears in the background of the document. |
boolean |
isDateIncluded()
Retrieves whether the watermark includes the date when the associated document is opened. |
boolean |
isDeleted()
Retrieves the state of the watermark. |
boolean |
isPolicyNameIncluded()
Retrieves whether the watermark includes the name of the policy applied to the associated document |
boolean |
isUserIdIncluded()
Retrieves whether the watermark includes the user identification of the user who opened the associated document. |
boolean |
isUserNameIncluded()
Retrieves whether the watermark includes the name of the user who opened the associated document. |
void |
setBackground(boolean background)
Sets whether the watermark appears in background or foreground of the document. |
void |
setCustomText(java.lang.String customText)
Sets the custom text that the watermark includes. |
void |
setDateIncluded(boolean include)
Sets whether the watermark includes the date when the associated document is opened. |
void |
setHorizontalAlignment(java.lang.String alignment)
Sets the horizontal alignment for the watermark. |
void |
setHorizontalOffset(float offset)
Sets the Offset of the watermark from the aligned position. |
void |
setName(java.lang.String name)
Sets the name for the watermark. |
void |
setOpacity(int percent)
Sets the opacity of the watermark. |
void |
setPolicyNameIncluded(boolean include)
Specifies whether the watermark includes the name of the policy applied to the associated document |
void |
setRotation(int degrees)
Sets the rotation of the watermark. |
void |
setScale(int scale)
Sets the size of the watermark font. |
void |
setUserIdIncluded(boolean include)
Specifies whether the watermark includes the user identification of the user who opened the associated document. |
void |
setUserNameIncluded(boolean include)
Specifies whether the watermark includes the user name of the user who opened the associated document. |
void |
setVerticalAlignment(java.lang.String alignment)
Sets the vertical alignment for the watermark. |
void |
setVerticalOffset(float offset)
Sets the offset of the watermark from the aligned position. |
Field Detail |
---|
static final java.lang.String HORIZONTAL_ALIGNMENT_LEFT
static final java.lang.String HORIZONTAL_ALIGNMENT_CENTER
static final java.lang.String HORIZONTAL_ALIGNMENT_RIGHT
static final java.lang.String VERTICAL_ALIGNMENT_TOP
static final java.lang.String VERTICAL_ALIGNMENT_CENTER
static final java.lang.String VERTICAL_ALIGNMENT_BOTTOM
Method Detail |
---|
boolean isUserNameIncluded()
void setUserNameIncluded(boolean include)
include
- A Boolean value of true if the watermark should include the user name and false if it
should not include the user name.boolean isUserIdIncluded()
void setUserIdIncluded(boolean include)
include
- A Boolean value of true if the watermark should include the user identification, or false
if the user identification is not included.boolean isPolicyNameIncluded()
void setPolicyNameIncluded(boolean include)
include
- A Boolean value of true if the watermark should include the user policy name, or false
if it should not include the policy name.boolean isDateIncluded()
void setDateIncluded(boolean include)
include
- A Boolean value of true if the watermark should include the date and false it
should not include the date.java.lang.String getCustomText()
void setCustomText(java.lang.String customText)
customText
- A string value that includes the custom text to include in the watermark and null
if no custom text should be included.int getOpacity()
void setOpacity(int percent) throws PDRLException
percent
- An integer that contains the opacity of the watermark. This value can be between 0
and 100. A value of 100 indicates the watermark is completely opaque.
A value of 0 indicates the watermark is completely transparent.
PDRLException
- if percent
is not in the range of valid values.boolean isBackground()
void setBackground(boolean background)
background
- A Boolean value of true if the watermark should appear in the background
and false if the watermark should appear in the foreground.int getRotation()
void setRotation(int degrees) throws PDRLException
degrees
- An integer that specifies the rotation of the watermark, in degrees. degrees
can be
any integer value between -180 and 180.
PDRLException
- if degrees
is not within the valid range of values.int getScale()
void setScale(int scale) throws PDRLException
scale
- An integer that specifies the size of the watermark font as a percentage of the default size.
scale
can be any integer value between 0 and 100.
PDRLException
- if scale
is not within the valid range of values.java.lang.String getHorizontalAlignment()
java.lang.String
that contains the constant value that represents the horizontal alignment.
The constant can be one of the following values:
HORIZONTAL_ALIGNMENT_LEFT
HORIZONTAL_ALIGNMENT_CENTER
HORIZONTAL_ALIGNMENT_RIGHT
void setHorizontalAlignment(java.lang.String alignment) throws PDRLException
alignment
- A java.lang.String
that contains one of the following three values:
HORIZONTAL_ALIGNMENT_LEFT
- specifies that the watermark is left-aligned.HORIZONTAL_ALIGNMENT_RIGHT
- specifies that the watermark is right-aligned.HORIZONTAL_ALIGNMENT_CENTER
- specifies that the watermark is horizontally centered on the page (the default value).PDRLException
- if alignment
does not contain a valid constant value.float getHorizontalOffset()
void setHorizontalOffset(float offset) throws PDRLException
offset
- offset of the watermark from the aligned position.
PDRLException
java.lang.String getVerticalAlignment()
The constant can be one of the following values:
VERTICAL_ALIGNMENT_TOP
VERTICAL_ALIGNMENT_CENTER
VERTICAL_ALIGNMENT_BOTTOM
void setVerticalAlignment(java.lang.String alignment) throws PDRLException
alignment
- A string value that specifies one of the following values:
VERTICAL_ALIGNMENT_TOP
- specifies that the watermark is top-aligned.VERTICAL_ALIGNMENT_BOTTOM
- specifies that the watermark is bottom-aligned.VERTICAL_ALIGNMENT_CENTER
- specifies that the watermark is vertically centered on the page (the default value).PDRLException
- if alignment
does not contain a valid constant value.float getVerticalOffset()
void setVerticalOffset(float offset) throws PDRLException
offset
- offset of the watermark from the aligned position
PDRLException
java.lang.String getName()
java.lang.String
that contains the name of the watermark.void setName(java.lang.String name) throws PDRLException
name
- A java.lang.String
that contains the name for the watermark.
name
can have a maximum length of 50 characters.
PDRLException
- if name
is longer than the allowed length.boolean isDeleted()
java.lang.String getId()
Watermark
object represents a watermark that is not registered with the Rights Management service.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |