public final class SignatureBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_HEIGHT |
static SignatureStyle |
DEFAULT_STYLE |
static double |
DEFAULT_WIDTH |
| Modifier and Type | Method and Description |
|---|---|
static SignatureBuilder |
acceptanceFor(GroupId groupId)
Creates a SignatureBuilder instance for any members of the group provided as parameter.
|
static SignatureBuilder |
acceptanceFor(Placeholder roleId)
Creates an acceptance consent for the signer having the placeholder's id provided
|
static SignatureBuilder |
acceptanceFor(String signerEmail)
Creates an acceptance consent for the signer having the email address provided.
|
SignatureBuilder |
atPosition(double x,
double y)
Sets the pixel coordinates, relative to the original document, where this signature will be placed at inside the page.
|
Signature |
build()
This method actually builds the Signature object
|
static SignatureBuilder |
captureFor(GroupId groupId)
Creates a SignatureBuilder instance for the signer with the group id provided as parameter
The signature style will be also set to SignatureStyle.HAND_DRAWN
|
static SignatureBuilder |
captureFor(Placeholder roleId)
Creates a SignatureBuilder instance for the signer with the placeholder's id provided as parameter
The signature style will be also set to SignatureStyle.HAND_DRAWN
|
static SignatureBuilder |
captureFor(String signerEmail)
Creates a SignatureBuilder instance for the signer with the email address provided as parameter.
|
SignatureBuilder |
disabled()
Marks the signature as disabled.
|
SignatureBuilder |
enableEnforceCaptureSignature()
Enables the signature level enforceCaptureSignature setting.
|
static SignatureBuilder |
initialsFor(GroupId groupId)
Creates a SignatureBuilder instance for any members of the group provided as parameter.
|
static SignatureBuilder |
initialsFor(Placeholder roleId)
Creates a SignatureBuilder instance for the signer with the placeholder's id provided as parameter
The signature style will be also set toSignatureStyle.INITIALS
|
static SignatureBuilder |
initialsFor(String signerEmail)
Creates a SignatureBuilder instance for the signer with the email address provided as parameter.
|
SignatureBuilder |
makeOptional()
Marks the signature as optional.
|
static SignatureBuilder |
mobileCaptureFor(GroupId groupId)
Creates a SignatureBuilder instance for the signer with the group id provided as parameter
The signature style will be also set to SignatureStyle.MOBILE_CAPTURE
|
static SignatureBuilder |
mobileCaptureFor(Placeholder roleId)
Creates a SignatureBuilder instance for the signer with the placeholder's id provided as parameter
The signature style will be also set to SignatureStyle.MOBILE_CAPTURE
|
static SignatureBuilder |
mobileCaptureFor(String signerEmail)
Creates a SignatureBuilder instance for the signer with the email address provided as parameter.
|
SignatureBuilder |
onPage(int pageNumber)
Sets the page number where this signature will be placed on.
|
SignatureBuilder |
setFromFile(boolean fromFile)
Enable capture signature to be from file
|
static SignatureBuilder |
signatureFor(GroupId groupId)
Creates a SignatureBuilder instance for any members of the group provided as parameter.
|
static SignatureBuilder |
signatureFor(Placeholder roleId)
Creates a SignatureBuilder instance for the placeholder having the role id as parameter
|
static SignatureBuilder |
signatureFor(String signerEmail)
Creates a SignatureBuilder instance for the signer having the email address provided as parameter
|
SignatureBuilder |
withField(Field field)
Adds a field to the signature
|
SignatureBuilder |
withField(FieldBuilder builder)
Adds a field bound to the signature
|
SignatureBuilder |
withFontSize(Integer fontSize)
Set a fontSize.
|
SignatureBuilder |
withId(SignatureId id)
Set a custom ID for the signature.
|
SignatureBuilder |
withName(String name)
Sets the name of the signature form field on the original PDF document.
|
SignatureBuilder |
withPositionAnchor(TextAnchor textAnchor)
Enables positioning the signature relative to a text string in the
original document.
|
SignatureBuilder |
withPositionAnchor(TextAnchorBuilder builder)
Enables positioning the signature relative to a text string in the
original document.
|
SignatureBuilder |
withPositionExtracted()
Enables signature extraction.
|
SignatureBuilder |
withSize(double width,
double height)
Sets the size, in pixel, of the signature
|
SignatureBuilder |
withStyle(SignatureStyle style)
Sets the style of the signature.
|
public static final double DEFAULT_WIDTH
public static final double DEFAULT_HEIGHT
public static final SignatureStyle DEFAULT_STYLE
public static SignatureBuilder signatureFor(String signerEmail)
signerEmail - the signer's email address @size(min="6", max="255", valid email address)public static SignatureBuilder signatureFor(GroupId groupId)
groupId - id of the group for which any of its members can sign.public static SignatureBuilder signatureFor(Placeholder roleId)
roleId - the placeholder's idpublic static SignatureBuilder acceptanceFor(String signerEmail)
signerEmail - the signer's email address @size(min="6", max="255", valid email address)public static SignatureBuilder acceptanceFor(GroupId groupId)
groupId - id of the group for which any of its members can sign.public static SignatureBuilder acceptanceFor(Placeholder roleId)
roleId - the placeholder's idpublic static SignatureBuilder initialsFor(String signerEmail)
signerEmail - the signer's email address @size(min="6", max="255", valid email address)public static SignatureBuilder initialsFor(GroupId groupId)
groupId - id of the group for which any of its members can sign.public static SignatureBuilder initialsFor(Placeholder roleId)
roleId - the placeholder's idpublic static SignatureBuilder captureFor(String signerEmail)
signerEmail - the signer's email address @size(min="6", max="255", valid email address)public static SignatureBuilder captureFor(GroupId groupId)
groupId - id of the group for which any of its members can sign.public static SignatureBuilder captureFor(Placeholder roleId)
roleId - the placeholder's idpublic static SignatureBuilder mobileCaptureFor(String signerEmail)
signerEmail - the signer's email address @size(min="6", max="255", valid email address)public static SignatureBuilder mobileCaptureFor(GroupId groupId)
groupId - id of the group for which any of its members can sign.public static SignatureBuilder mobileCaptureFor(Placeholder roleId)
roleId - the placeholder's idpublic SignatureBuilder withId(SignatureId id)
Set a custom ID for the signature. If none is provided, the system will assign one by default. This package id needs to be unique per document.
id - the signature ID @size(min="1", max="255")public SignatureBuilder onPage(int pageNumber)
pageNumber - the page number the signature will be placed on @min="0"public SignatureBuilder atPosition(double x, double y)
x - x-coordinate of the signature's top-left corner @min="0"y - y-coordinate of the signature's top-;eft corner @min="0"public SignatureBuilder withSize(double width, double height)
width - the width of the signature @min="0"height - the height of the signature @min="0"public SignatureBuilder withFontSize(Integer fontSize)
fontSize - Integer fontSize of the field)public SignatureBuilder withStyle(SignatureStyle style)
style - the style of the signaturepublic SignatureBuilder withField(FieldBuilder builder)
builder - a convenient field builderpublic SignatureBuilder withField(Field field)
field - the fieldpublic SignatureBuilder withName(String name)
withPositionExtracted().name - the signature's name @size(min="1", max="255")public SignatureBuilder withPositionExtracted()
withName(String).
When using this method, you must not also use atPosition(double, double) and withSize(double, double)}
public SignatureBuilder withPositionAnchor(TextAnchorBuilder builder)
atPosition(double, double).builder - the text anchor builderpublic SignatureBuilder withPositionAnchor(TextAnchor textAnchor)
atPosition(double, double).textAnchor - the text anchorpublic SignatureBuilder setFromFile(boolean fromFile)
fromFile - is from file datapublic SignatureBuilder makeOptional()
public SignatureBuilder disabled()
public SignatureBuilder enableEnforceCaptureSignature()
public Signature build()
Copyright 2022 OneSpan All rights reserved.