public class TextAnchorBuilder extends Object
Modifier and Type | Method and Description |
---|---|
TextAnchorBuilder |
atPosition(TextAnchorPosition position)
Set the position relative to the bounding box of the searched string the
position offset is calculated from.
|
TextAnchor |
build()
Builds the text anchor.
|
static TextAnchorBuilder |
newTextAnchor(String anchorText)
Creates a new textanchor for a given text string
|
TextAnchorBuilder |
withCharacter(int character)
Set character index of the anchor text for which to position the signature relative to.
|
TextAnchorBuilder |
withOccurence(int occurence)
Set the index of the occurrence of the text string we want to use for
text anchor.
|
TextAnchorBuilder |
withOffset(int x,
int y)
Offset in pixel, relative to the TextAnchorPosition
atPosition(TextAnchorPosition) where the signature or field will
be positioned. |
TextAnchorBuilder |
withSize(int width,
int height)
Size, in pixel, of the signature of form field.
|
public static TextAnchorBuilder newTextAnchor(String anchorText)
anchorText
- the text string that MUST be present in the document. @size(max="255")public TextAnchorBuilder withOccurence(int occurence)
E.g.: If there are multiple occurrence of the string "signature:" in a document, this allows to indicate which occurrence we are actually looking for.
occurence
- @min="0"public TextAnchorBuilder withCharacter(int character)
character
- the index of the anchor text character to position the signature @min="0"public TextAnchorBuilder atPosition(TextAnchorPosition position)
E.g.: We want to position a signature relative to the TOP_LEFT corner of the string "signature:"
position
- public TextAnchorBuilder withOffset(int x, int y)
atPosition(TextAnchorPosition)
where the signature or field will
be positioned.x
- pixel offset @min="0"y
- pixel offset @min="0"public TextAnchorBuilder withSize(int width, int height)
width
- pixel width @min="0"height
- pixel height @min="0"public TextAnchor build()
Copyright 2014, Silanis Technology, Inc. All rights reserved.