@Deprecated
public interface DynamicSignatureProfile
PdfAs
you can set properties via setPropertyRaw(String, String)
or setFieldValue(String, String)
.apply()
to use the profile. The identifying name (e.g. for SignParameters.setSignatureProfileId(String)
can be obtained via getName()
.DynamicSignatureLifetimeEnum
the profile can be alive and usable till you dispose()
it manually.
Sample usage:
SignParameters sp = new SignParameters(); . . . sp.setSignatureType(Constants.SIGNATURE_TYPE_TEXTUAL); sp.setSignatureDevice(Constants.SIGNATURE_DEVICE_MOA); // create a new dynamic profile based on SIGNATURBLOCK_DE (every property is copied) with manual lifetime DynamicSignatureProfile dsp = pdfAs.createDynamicSignatureProfile("myUniqueName", "SIGNATURBLOCK_DE", DynamicSignatureLifetimeEnum.MANUAL); // set something dsp.setPropertyRaw("key.SIG_META", "Statement"); dsp.setPropertyRaw("value.SIG_META", "respect to the man in the icecream van ${subject.EMAIL}"); dsp.setPropertyRaw("value.SIG_LABEL", "./images/signatur-logo_en.png"); dsp.setPropertyRaw("table.main.Style.halign", "right"); // mandatory: apply the profile, you have to apply again after changes (overriding your previous setting) dsp.apply(); sp.setSignatureProfileId(dsp.getName()); // execute PDF-AS pdfAs.sign(sp); . . . // your profile is saved and you can obtain it again anytime later: dsp = pdfAs.loadDynamicSignatureProfile("myUniqueName"); // use it for another sign. // dont forget to dispose() sometimes because it was manual lifetime System.out.println(dsp.getName());
Modifier and Type | Method and Description |
---|---|
void |
apply()
Deprecated.
Apply the signature profile.
|
void |
dispose()
Deprecated.
Disposes the signature profile from the global store.
|
java.lang.String |
getFieldValue(java.lang.String fieldName)
Deprecated.
Get a field value from the profile.
|
java.lang.String |
getName()
Deprecated.
Get the name of the dynamic signature profile.
|
java.lang.String |
getPropertyRaw(java.lang.String key)
Deprecated.
Get any property from the signature profile.
|
void |
setFieldValue(java.lang.String fieldName,
java.lang.String value)
Deprecated.
Set a field value for the profile.
|
void |
setPropertyRaw(java.lang.String key,
java.lang.String val)
Deprecated.
Set any property for the signature profile.
|
java.lang.String getName()
void setFieldValue(java.lang.String fieldName, java.lang.String value)
setPropertyRaw(String, String)
for setting any property.sig_obj.MEIN_DYN_SIGNATURBLOCK.value.SIG_META
just use SIG_META
as fieldName.fieldName
- the name of the fieldvalue
- the value to setjava.lang.String getFieldValue(java.lang.String fieldName)
setFieldValue(String, String)
fieldName
- void setPropertyRaw(java.lang.String key, java.lang.String val)
sig_obj.MEIN_DYN_SIGNATURBLOCK.key.SIG_META
use key.SIG_META
key
- property keyval
- property valuejava.lang.String getPropertyRaw(java.lang.String key)
setPropertyRaw(String, String)
for details.key
- void apply()
DynamicSignatureLifetimeEnum
you
have to dispose()
it manually when not needed anymore.void dispose()
DynamicSignatureLifetimeEnum.MANUAL
only.