Click or drag to resize
SignDocField Class
Class representing one field of a document
Inheritance Hierarchy
SystemObject
  de.softpro.signdocsdkSignDocField

Namespace:  de.softpro.signdocsdk
Assembly:  SPSignDoc_4.3_DotNetLib (in SPSignDoc_4.3_DotNetLib.dll) Version: 1.0.6773.37566
Syntax
C#
public sealed class SignDocField : IDisposable

The SignDocField type exposes the following members.

Constructors
Methods
  NameDescription
Public methodaddCertSeedValueIssuerCertificate
Add an issuer certificate to the certificate seed value dictionary. See the PDF Reference for details.
Public methodaddCertSeedValuePolicy
Add a policy OID to the certificate seed value dictionary. See the PDF Reference for details.
Public methodaddCertSeedValueSubjectCertificate
Add a subject certificate to the certificate seed value dictionary. See the PDF Reference for details.
Public methodaddCertSeedValueSubjectDN
Add a subject distinguished name to the certificate seed value dictionary. See the PDF Reference for details.
Public methodaddChoice(String)
Add a choice to a list box or combo box. This function uses the choice value as export value.
Public methodaddChoice(String, String)
Add a choice to a list box or combo box. This function uses the choice value as export value.
Public methodaddLockField
Add a lock field to the field.
Public methodaddSeedValueDigestMethod
Add a DigestMethod value to the seed value dictionary. See getSeedValueDigestMethod() for details.
Public methodaddSeedValueSubFilter
Add a SubFilter value to the seed value dictionary. See getSeedValueSubFilter() for details.
Public methodaddValue
Add a value to the field. Pushbutton fields and signature fields don't have a value, list boxes can have multiple values selected if f_MultiSelect is set. Hard line breaks for multiline text fields(ie, text fields with flag f_MultiLine set) are encoded as "\r", "\n", or "\r\n".The behavior for values containing line breaks is undefined if the f_MultiLine flag is not set. After calling this function, getValueIndex() will return -1.
Public methodaddWidget
Add a widget to the field. The new widget will be added at the end, ie, calling getWidgetCount() before calling addWidget() yields the index of the widget that will be added. After adding a widget, the new widget will be selected. You must set the page number and the coordinates in the new widget before calling SignDocDocument.addField() or SignDocDocument.setField().
Public methodclearCertSeedValueIssuerCertificates
Remove all issuer certificates from the certificate seed value dictionary. See the PDF Reference for details. After calling this function, getCertSeedValueIssuerCertificateCount() will return 0.
Public methodclearCertSeedValuePolicies
Remove all policy OIDs from the certificate seed value dictionary. See the PDF Reference for details. After calling this function, getCertSeedValuePolicyCount() will return 0.
Public methodclearCertSeedValueSubjectCertificates
Remove all subject certificates from the certificate seed value dictionary. See the PDF Reference for details. After calling this function, getCertSeedValueSubjectCertificateCount() will return 0.
Public methodclearCertSeedValueSubjectDNs
Remove all subject distinguished names from the certificate seed value dictionary. See the PDF Reference for details. After calling this function, getCertSeedValueSubjectDNCount() will return 0.
Public methodclearChoices
Clear the choices of a list box or combo box. After calling this function, getChoiceCount() will return 0.
Public methodclearLockFields
Clear the lock fields. After calling this function, getLockFieldCount() will return 0.
Public methodclearSeedValueDigestMethods
Remove all DigestMethod values from the seed value dictionary. See getSeedValueDigestMethod() for details. After calling this function, getSeedValueDigestMethodCount() will return 0.
Public methodclearSeedValueSubFilters
Remove all SubFilter values from the seed value dictionary. See getSeedValueSubFilter() for details. After calling this function, getSeedValueSubFilterCount() will return 0.
Public methodclearValues
Clear the values. After calling this function, getValueCount() will return 0 and getValueIndex() will return -1.
Public methodclickButton
Click a check box or a radio button. This function updates both the value(see setValue()) and the value index(see setValueIndex()) based on the current(non - committed) state of the SignDocField object(not looking at the state of the field in the document).It does nothing for other field types. Adobe products seem to ignore f_NoToggleToOff flag being not set, this function behaves the same way(ie, as if f_NoToggleToOff was set).
Public methodDispose
Releases all resources used by the SignDocField
Public methodgetAlternateName
The alternate name(if present) should be used for displaying the field name in a user interface.Currently, only PDF documents support alternate field names.
Public methodgetBackgroundColor
Get the background color of the widget. This function is available for fields of PDF documents only.
Public methodgetBorderColor
Get the border color of the widget. This function is available for fields of PDF documents only. The border color is used only if the border width is positive.
Public methodgetBorderStyle
Get the border style. This function is available for fields of PDF documents only.
Public methodgetBorderWidth
Get the border width of the widget. This function is available for fields of PDF documents only.
Public methodgetBottom
Get the bottom coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodgetButtonStyle
Get the button style of a check box or radio button field. This function is available for fields of PDF documents only.
Public methodgetButtonValue
Get the button value of a widget of a radio button group or check box. Usually, different radio buttons (widgets) of a radio button group (field) have different values. The radio button group has a value (returned by getValue()) which is either "Off" or one of those values. The individual buttons (widgets) of a check box field can also have different export values. Different radio buttons (widgets) of a radio button group (field) can have the same value; in that case, the radio buttons are linked. The individual buttons of a check box field also can have the same value.
Public methodgetCertSeedValueFlags
Get the certificate seed value dictionary flags (/SV/Cert/Ff) of a signature field. The default value is 0.
Public methodgetCertSeedValueIssuerCertificate
Get the number of issuer certificates in the certificate seed value dictionary. See the PDF Reference for details
Public methodgetCertSeedValueIssuerCertificateCount
Public methodgetCertSeedValuePolicy
Get a policy OID from the certificate seed value dictionary. See the PDF Reference for details.
Public methodgetCertSeedValuePolicyCount
Get the number of policy OIDs in the certificate seed value dictionary. See the PDF Reference for details.
Public methodgetCertSeedValueSubjectCertificate
Get a subject certificate of the certificate seed value dictionary. See the PDF Reference for details.
Public methodgetCertSeedValueSubjectCertificateCount
Get the number of subject certificates in the certificate seed value dictionary. See the PDF Reference for details.
Public methodgetCertSeedValueSubjectDN
Get a subject distinguished name from the certificate seed value dictionary. See the PDF Reference for details.
Public methodgetCertSeedValueSubjectDNCount
Get the certificate seed value dictionary flags (/SV/Cert/Ff) of a signature field. The default value is 0. ///
Public methodgetChoiceCount
Get the number of available choices for a list box or combo box. List boxes and combo boxes can have multiple possible choices.For other field types, this function returns 0.
Public methodgetChoiceExport
Get the export value for an available choice of a list box or combo box. List boxes and combo boxes can have multiple possible choices.Each choice has a value(which will be displayed) and an export value(which is used for exporting the value of the field).Usually, both values are identical.This function returns one export value, use getChoiceValue() to get the associated choice value.
Public methodgetChoiceValue
Get an available choice of a list box or combo box. List boxes and combo boxes can have multiple possible choices.Each choice has a value(which will be displayed) and an export value(which is used for exporting the value of the field).This function returns one choice value, use getChoiceExport() to get the associated export value.
Public methodgetDocMDP
Get the DocMDP P value of a certification signature. The DocMDP p value specifies what modifications to the document are allowed by the certification signature. This function does not verify the certification signature.
Public methodgetEmptyFieldColor
Get the color used for empty signature field in TIFF document. The default value is white.
Public methodgetFlags
Get the flags of the field. The default value is 0.
Public methodgetJustification
Get the justification of the widget.
Public methodgetLeft
Get the left coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodgetLockField
Get the name of a lock field.
Public methodgetLockFieldCount
Get the number of field names for lt_include and lt_exclude.
Public methodgetLockMDP
Get the lock MDP value.
Public methodgetLockType
Get the lock type. The lock type defines the fields to be locked when signing this signature field.
Public methodgetMappingName
Get the mapping name of the field. The mapping name(if present) should be used for exporting field data.Currently, only PDF documents support mapping field names.
Public methodgetMaxLen
Get maximum length of text field. The default value is - 1.
Public methodgetName
Get the name of the field
Public methodgetPage
Get the page number. This function returns the index of the page on which this field occurs (1 for the first page), or 0 if the page number is unknown.
Public methodgetRight
Get the right coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodgetRotation
Get the rotation of the widget contents. The rotation is specified in degrees (counter-clockwise). The default value is 0. For instance, if the rotation is 270, left-to right text will display top down.
Public methodgetSeedValueAddRevInfo
Get the AddRevInfo flag from the signature field seed value dictionary. If the AddRevInfo flag is set, revocation must be checked at signing time and revocation data must be included in the signature.
Public methodgetSeedValueDigestMethod
Get a DigestMethod value from the seed value dictionary. DigestMethod values in the seed value dictionary restrict the hash algorithms available for signing with RSA. Note that DigestMethod values are different from the message digest algorithms returned by de.softpro.doc.SignDocVerificationResult.getDigestAlgorithm():
DigestMethodgetDigestAlgorithm()DetachedHashAlgorithm
n/a "MD5" n/a
"RIPEMD160" "RIPEMD-160" dha_ripemd160
"SHA1" "SHA-1" dha_sha1
- "SHA-224" dha_sha224
"SHA256" "SHA-256" dha_sha256
"SHA384" "SHA-384" dha_sha384
"SHA512" "SHA-512" dha_sha512
Public methodgetSeedValueDigestMethodCount
Get the number of DigestMethod values in the seed value dictionary. See getSeedValueDigestMethod() for details.
Public methodgetSeedValueDigestMethodRequired
This function gets a flag from the signature field seed value dictionary that indicates whether the DigestMethod values are a required constraint or not. If this function returns true, a signing method corresponding to one of the DigestMethod values returned by getSeedValueDigestMethod() must be used for signing.
Public methodgetSeedValueFilter
Get Filter entry (signature handler) from the signature field seed value dictionary.
Public methodgetSeedValueFilterRequired
This function gets a flag from the signature field seed value dictionary that indicates whether the Filter entry (signature handler) is a required constraint or not. If this function returns true, the signature handler returned by getSeedValueFilter() must be used for signing.
Public methodgetSeedValueMDP
Get the MDP value from the signature field seed value dictionary.
Public methodgetSeedValueSubFilter
Get a SubFilter value from the seed value dictionary. SubFilter values in the seed value dictionary restrict the signing methods available for signing. These values are currently defined:
  • - "adbe.x509.rsa_sha1" (SignDocSignatureParameters.m_digsig_pkcs1)
  • - "adbe.pkcs7.sha1" (SignDocSignatureParameters.m_digsig_pkcs7_sha1)
  • - "adbe.pkcs7.detached" (SignDocSignatureParameters.m_digsig_pkcs7_detached)
  • - "ETSI.CAdES.detached" (SignDocSignatureParameters.m_digsig_cades_detached)
.
Public methodgetSeedValueSubFilterCount
Get the number of SubFilter values in the seed value dictionary. See getSeedValueSubFilter() for details.
Public methodgetSeedValueSubFilterRequired
This function gets a flag from the signature field seed value dictionary that indicates whether the SubFilter values are a required constraint or not. If this function returns true, a signing method corresponding to one of the SubFilter values returned by getSeedValueSubFilter() must be used for signing.
Public methodgetSeedValueTimeStampRequired
This function gets a flag from the signature field seed value dictionary that indicates whether a time stamp is required or not for the signature. If this function returns true, the URL returned by getSeedValueTimeStampServerURL() will be used to add a time stamp to the signature when signing.
Public methodgetSeedValueTimeStampServerURL
Get the URL of the RFC 3161 time-stamp server from the signature field seed value dictionary. The URL should be an ASCII string.
Public methodgetSignatureType
Get the signature type of a signature field. For TIFF documents, only approval signatures are available. For st_certification, you should display "certified by ..." rather than "signed by ...".
Public methodgetTextFieldAttributes
Get the text field attributes of the widget. This function returns null if the field uses the document's default font name for fields. Text fields, signature fields, list boxes, and combo boxes can have text field attributes.
Public methodgetTop
Get the top coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodgetTopIndex
Get the index of the choice to be displayed in the first line of a list box. The default value is 0.
Public methodgetType
Get the type of the field.
Public methodgetValue
Get a value of the field. Pushbutton fields and signature fields don't have a value, list boxes can have multiple values selected if f_MultiSelect is set. Hard line breaks for multiline text fields(ie, text fields with flag f_MultiLine set) are encoded as "\r", "\n", or "\r\n".
Public methodgetValueCount
Get the number of values of the field. Pushbutton fields and signature fields don't have a value, list boxes can have multiple values selected if f_MultiSelect is set
Public methodgetValueIndex
Get the current value index. Radio button groups and check box fields can have multiple widgets having the same button value.For check box fields and radio buttons without f_RadiosInUnison set, specifying the selected button by value string is not possible in that case.A 0 - based value index can be used to find out which button is selected or to select a button. Radio button groups and check box fields need not use a value index; in fact, they usually don't. SignDocDocument.addField() and SignDocDocument.setField() update the value index if the value of a radio button group or check box field is selected by string(ie, setValue()) and the field has ambiguous button names. The "Off" value never has a value index.
Remarks
addValue(), clearValues(), and setValue() make the value index unset (ie, getValueIndex() will return -1).
Public methodgetWidget
Get the index of the currently selected widget. Initially, the first widget is selected (ie, this function returns 0). However, there is an exception to this rule: SignDocField objects created by SignDocDocument.getFieldsOfPage() can have a different widget selected initially for PDF documents.
Public methodgetWidgetCount
Get the number of widgets. Signature fields always have exactly one widget. Radio button fields (radio button groups) usually have one widget per button (but can have more widgets than buttons by having multiple widgets for some or all buttons).
Public methodgetWidgetFlags
Get the annotation flags of the widget, see wf_Invisible. The default value is wf_Print. The annotation flags are used for PDF documents only. Currently, the semantics of the annotation flags are ignored by this software (ie, the flags are stored in the document, but they don't have any meaning to this software).
Public methodinsertWidget
Add a widget to the field in front of another widget. The new widget will be inserted at the specified index, ie, the index of the new widget will be aIndex. After adding a widget, the new widget will be selected. You must set the page number and the coordinates in the new widget before calling SignDocDocument.addField() or SignDocDocument.setField()
Public methodisCurrentlyClearable
Check if this signature field is currently clearable. For some document formats(TIFF), signatures may only be cleared in the reverse order of signing(LIFO).Use this function to find out whether the signature field is currently clearable(as determined by SignDocDocument.getField() or SignDocDocument.getFields(),
Public methodisSigned
Check if this field is a signed signature field. This function is much more efficient than SignDocDocument.verifySignature().
Public methodremoveCertSeedValueIssuerCertificate
Remove an issuer certificate from the certificate seed value dictionary. See the PDF Reference for details.
Public methodremoveCertSeedValuePolicy
Remove a policy OID from the certificate seed value dictionary. See the PDF Reference for details.
Public methodremoveCertSeedValueSubjectCertificate
Remove a subject certificate from the certificate seed value dictionary. See the PDF Reference for details.
Public methodremoveCertSeedValueSubjectDN
Remove a subject distinguished name from the certificate seed value dictionary. See the PDF Reference for details.
Public methodremoveChoice
Remove a choice from a list box or combo box.
Public methodremoveLockField
Set a lock field. Calling this function is equivalent to calling clearLockFields() and addLockField().
Public methodremoveSeedValueDigestMethod
Remove a DigestMethod value from the seed value dictionary. See getSeedValueDigestMethod() for details.
Public methodremoveSeedValueSubFilter
Remove a SubFilter value from the seed value dictionary. See getSeedValueSubFilter() for details.
Public methodremoveValue
Remove a value from the field. After calling this function, getValueIndex() will return -1.
Public methodremoveWidget
Remove a widget from the field. This function fails when there is only one widget. That is, a field always has at least one widget. If the currently selected widget is removed, the following rules apply: When removing the last widget (the one with index getWidgetCount()-1), the predecessor of the removed widget will be selected. Otherwise, the index of the selected widget won't change, ie, the successor of the removed widget will be selected. If the widget to be removed is not selected, the currently selected widget will remain selected. All widgets having an index greater than aIndex will have their index decremented by one.
Public methodselectWidget
Select a widget. This function selects the widget to be used by getWidgetFlags(), getPage(), getLeft(), getBottom(), getRight(), getTop(), getButtonValue(), getJustification(), getRotation(), getTextFieldAttributes(), getBackgroundColor(), getBorderColor(), getBorderWidth(), getBorderStyle(), getButtonStyle(), setWidgetFlags(), setPage(), setLeft(), setBottom(), setRight(), setTop(), setButtonValue(), setJustification(), setRotation(), setTextFieldAttributes(), setBackgroundColor(), setBorderColor(), setBorderWidth(), setBorderStyle(), and setButtonStyle().
Public methodsetAlternateName
Set the alternate name of the field. The alternate name(if present) should be used for displaying the field name in a user interface.Currently, only PDF documents support alternate field names.
Public methodsetBackgroundColor
Set the background color of the widget. This function is available for fields of PDF documents only. The initial value is null (transparent).
Public methodsetBorderColor
Set the border color of the widget. This function is available for fields of PDF documents only. The border color is used only if the border width is positive. For combo boxes, check boxes, and radio buttons, the initial value is black, for other field types, the initial value is transparent. After creation of a SignDocField object, calling setType() will set the border color accordingly. Once setBorderColor() has been called, setType() will no longer affect the border color.
Public methodsetBorderStyle
Set the border style. This function is available for fields of PDF documents only. If @a aStyle is bos_other, SignDocDocument.setField() will keep the current border style and SignDocDocument.addField() will fail.
Public methodsetBorderWidth
Set the border width of the widget. This function is available for fields of PDF documents only. The initial value is 1.
Public methodsetBottom
Set the bottom coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodsetButtonStyle
Set the button style of a check box or radio button field. This function is available for fields of PDF documents only. If @a aStyle is bus_other, SignDocDocument.setField() will keep the current border style and SignDocDocument.addField() will fail.
Public methodsetButtonValue
Set the button value of a widget of a radio button group or a check box. Usually, different radio buttons (widgets) of a radio button group (field) have different values. The radio button group has a value (returned by getValue()) which is either "Off" or one of those values. The individual buttons (widgets) of a check box field can also have different export values. Different radio buttons (widgets) of a radio button group (field) can have the same value; in that case, the radio buttons are linked. The individual buttons of a check box field also can have the same value. SignDocDocument.addField() and SignDocDocument.setField() ignore the value set by this function if the field is neither a radio button group nor a check box field.
Public methodsetCertSeedValueFlags
Set the certificate seed value dictionary flags (/SV/Cert/Ff) of a signature field. The default value is 0.
Public methodsetCertSeedValueIssuerCertificate(String)
Set an issuer certificate in the certificate seed value dictionary. See the PDF Reference for details. Calling this function is equivalent to calling clearCertSeedValueIssuerCertificates() and addCertSeedValueIssuerCertificate().
Public methodsetCertSeedValueIssuerCertificate(Int32, String)
Set an issuer certificate in the certificate seed value dictionary. See the PDF Reference for details.
Public methodsetCertSeedValuePolicy(String)
Set a policy OID in the certificate seed value dictionary. See the PDF Reference for details. Calling this function is equivalent to calling clearCertSeedValuePolicies() and addCertSeedValuePolicy().
Public methodsetCertSeedValuePolicy(Int32, String)
Set a policy OID in the certificate seed value dictionary. See the PDF Reference for details.
Public methodsetCertSeedValueSubjectCertificate(String)
Set a subject certificate in the certificate seed value dictionary. See the PDF Reference for details. Calling this function is equivalent to calling clearCertSeedValueSubjectCertificates() and addCertSeedValueSubjectCertificate().
Public methodsetCertSeedValueSubjectCertificate(Int32, String)
Set a subject certificate in the certificate seed value dictionary. See the PDF Reference for details.
Public methodsetCertSeedValueSubjectDN(String)
Set a subject distinguished name in the certificate seed value dictionary. See the PDF Reference for details.
Public methodsetCertSeedValueSubjectDN(Int32, String)
Set a subject distinguished name in the certificate seed value dictionary. See the PDF Reference for details.
Public methodsetChoice(Int32, String)
Set a choice value of a list box or combo box. This function uses the choice value as export value.
Public methodsetChoice(Int32, String, String)
Set a choice value of a list box or combo box. This function uses the choice value as export value.
Public methodsetEmptyFieldColor
Set color used for empty signature field in TIFF document. The default value is white.For non - TIFF documents, the value set by this function is ignored.The value is also ignored if compatibility with version 1.12 and earlier is requested.
Public methodsetFlags
Set the flags of the field. The default value is 0.
Public methodsetJustification
Set the justification of the widget. The default value is j_none. For text fields and list boxes, the justification must be #j_left, #j_center, or #j_right. For other fields, the justification must be #j_none.
Public methodsetLeft
Set the left coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodsetLockField(String)
Set a lock field.
Public methodsetLockField(Int32, String)
Public methodsetLockMDP
Set the lock MDP value.
Public methodsetLockType
GSt the lock type. The lock type defines the fields to be locked when signing this signature field.
Public methodsetMappingName
Set the mapping name of the field. The mapping name(if present) should be used for exporting field data.Currently, only PDF documents support mapping field names.
Public methodsetMaxLen
Set maximum length of text field.
Public methodsetName
Set the name of the field Different document types impose different restrictions on field names.PDF fields have hierarchical field names with components separated by dots. SignDocDocument.setField() operates on the field having a fully - qualified name which equals the name set by this function.In consequence, SignDocDocument.setField() cannot change the name of a field.
Public methodsetPage
Set the page number. This function sets the index of the page on which this field occurs (1 for the first page). By calling SignDocDocument.getField(), setPage(), and SignDocDocument.setField(), you can move a field's widget to another page but be careful because the two pages may have different conversion factors, see SignDocDocument.getConversionFactors().
Public methodsetRight
Set the right coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodsetRotation
Set the rotation of the widget contents. The rotation is specified in degrees (counter-clockwise). The default value is 0. For instance, if the rotation is 270, left-to right text will display top down. Currently, the rotation must always be 0 for TIFF document
Public methodsetSeedValueAddRevInfo
Set the AddRevInfo flag in the signature field seed value dictionary. This function sets both the AddRevInfo flag and the flag specifying that AddRevInfo is mandatory. (Both flags are set to the same value, that is, you cannot set AddRevInfo as optional constraint.) If the AddRevInfo flag is set, revocation must be checked at signing time and revocation data must be included in the signature.
Public methodsetSeedValueDigestMethod
Set a DigestMethod value in the seed value dictionary. See getSeedValueDigestMethod() for details. Calling this function is equivalent to calling clearSeedValueDigestMethods() and addSeedValueDigestMethod().
Public methodsetSeedValueDigestMethodByIndex
Set a DigestMethod value in the seed value dictionary. See getSeedValueDigestMethod() for details.
Public methodsetSeedValueDigestMethodRequired
Set a flag from the signature field seed value dictionary that indicates whether the DigestMethod values are a required constraint or not.
Public methodsetSeedValueFilter
Set the Filter entry (signature handler) in the signature field seed value dictionary.
Public methodsetSeedValueMDP
Set the MDP value in the signature field seed value dictionary.
Public methodsetSeedValueSubFilter
Set a SubFilter value in the seed value dictionary. See getSeedValueSubFilter() for details. Calling this function is equivalent to calling clearSeedValueSubFilters() and addSeedValueSubFilter().
Public methodsetSeedValueSubFilterByIndex
Set a SubFilter value in the seed value dictionary. See getSeedValueSubFilter() for details.
Public methodsetSeedValueSubFilterRequired
Set a flag from the signature field seed value dictionary that indicates whether the SubFilter values are a required constraint or not.
Public methodsetSeedValueTimeStamp
Set the URL of an RFC 3161 time-stamp server in the signature field seed value dictionary. Note: URLs must be ASCII strings.
Public methodsetTextFieldAttributes
Set the text field attributes of the widget. Font name and font size must be specified.The text color is optional.This function fails if any of the attributes of aInput are invalid. Text field attributes can be specified for text fields, signature fields, list boxes, and combo boxes. If SignDocTextFieldAttributes.isSet() returns false for aInput, the text field attributes of the field will be removed by SignDocDocument.setField(). The following rules apply if the field does not have text field attributes : If the field inherits text field attributes from a ancestor field, those will be used by PDF processing software. Otherwise, if the document has specifies text field attributes(see SignDocDocument.getTextFieldAttributes()), those will be used by PDF processing software. Otherwise, the field is not valid. To avoid having invalid fields, SignDocDocument.addField() and SignDocDocument.setField() will use text field attributes specifying Helvetica as the font and black for the text color if the field does not inherit text field attributes from an ancestor field or from the document. This function always fails for TIFF documents.
Public methodsetTop
Set the top coordinate. The origin is in the bottom left corner of the page, see Coordinate Systems.
Public methodsetTopIndex
Set the index of the choice to be displayed in the first line of a list box. This value is ignored for other field types.
Public methodsetType
Set the type of the field. The default value is #t_unknown. Calling this function may affect the border color, see setBorderColor().
Public methodsetValue(String)
Set the value of the field. Calling this function is equivalent to calling clearValues() and addValue(). Hard line breaks for multiline text fields(ie, text fields with flag f_MultiLine set) are encoded as "\r", "\n", or "\r\n".The behavior for values containing line breaks is undefined if the f_MultiLine flag is not set. After calling this function, getValueIndex() will return -1.
Public methodsetValue(Int32, String)
Set a value of the field. Pushbutton fields and signature fields don't have a value, list boxes can have multiple values selected if f_MultiSelect is set. Hard line breaks for multiline text fields(ie, text fields with flag f_MultiLine set) are encoded as "\r", "\n", or "\r\n".The behavior for values containing line breaks is undefined if the f_MultiLine flag is not set. After calling this function, getValueIndex() will return -1.
Public methodsetValueIndex
Set the value index. Radio button groups and check box fields can have multiple widgets having the same button value.For check box fields and radio buttons without f_RadiosInUnison set, specifying the selected button by value string is ambiguous in that case.A 0 - based value index can be used to find out which button is selected or to select a button. Radio button groups and check box fields need not use a value index; in fact, they usually don't. However, you can always set a value index for radio button groups and check box fields. If the value index is non - negative, SignDocDocument.addField() and SignDocDocument.setField() will use the value index instead of the string value set by setValue(). Calling setValueIndex() doesn't affect the return value of getValue() as the value index is used by SignDocDocument.addField() and SignDocDocument.setField() only. However, successful calls to SignDocDocument.addField() and SignDocDocument.setField() will make getValue() return the selected value. For radio button groups with f_RadiosInUnison set and non - unique button values and for check box fields with non - unique button values, for each button value, the lowest index having that button value is the canonical one.After calling SignDocDocument.addField() or SignDocDocument.setField(), getValueIndex() will return the canonical value index. Don't forget to update the value index when adding or removing widgets! SignDocDocument.addField() and SignDocDocument.setField() will fail if the value index is non - negative for fields other than radio button groups and check box fields. The "Off" value never has a value index.
Public methodsetWidgetFlags
Set the annotation flags of the widget, see wf_Invisible. The default value is wf_Print. The annotation flags are used for PDF documents only. Currently, the semantics of the annotation flags are ignored by this software (ie, the flags are stored in the document, but they don't have any meaning to this software).
Public methodToString (Overrides ObjectToString.)
Top
Remarks
Calling methods of this class does not modify the document, use SignDocDocument.setField() to apply your changes to the document or SignDocDocument.addField() to add the field to the document. In PDF documents, a field may have multiple visible "widgets". For instance, a radio button group (radio button field) usually has multiple visible buttons, ie, widgets. A SignDocField object represents the logical field (containing the type, name, value, etc) as well as all its widgets. Each widget has a page number, a coordinate rectangle, and, for some field types, text field attributes. Only one widget of the field is accessible at a time in a SignDocField object; use selectWidget() to select the widget to be operated on. For radio button fields and check box fields, each widget also has a "button value". The button value should remain constant after the document has been created (but it can be changed if needed). The field proper has a value which is either "Off" or one of the button values of its widgets. Each widget of a radio button field or a check box field is either off or on. If all widgets of a radio button field or a check box are off, the field's value is "Off". If at least one widget is on, the field's value is that widget's "button value". As the value of a field must be different for the on and off states of the field, the button values must not be "Off". Check box fields usually have exactly one widget. If that widget's button value is, say, "On", the field's value is either "Off" (for the off state) or "On" (for the on state). Check box fields can have multiple widgets. If all widgets have the same button value, say, "yes", the field's value is either "Off" (for the off state) or "yes" (for the on state). Clicking one widget of the check box field will toggle all widgets of that check box field. Check box fields can have multiple widgets having different button values. If a check box field has two widgets with button values, say, "1" and "2", the field's value is either "Off" (for the off state), "1" (if the first widget is on) or "2" (if the second widget is on). The two widgets cannot be on at the same time. If a check box field has three widgets with button values, say, "one, "two", and "two", respectively, the field's value is either "Off" (for the off state), "one" (if the first widget is on) or "two" (if the second and third widgets are on). The second and third widgets will always have the same state and that state will never be the same as the state of the first widget. A radio button field usually has at least two widgets, having different button values. If a radio button field has two widgets with button values, say, "a" and "b", the field's value is either "Off" (for the off state), "a" (if the first widget is on), or "b" (if the second widget is on). Clicking the first widget puts the first widget into the on state and the second one into the off state (and vice versa). Different widgets of a radio button field can have the same button value. The behavior for clicking a widget with non-unique button value depends on the f_RadiosInUnison field flag. If that flag is set (it usually is), widgets having the same button value always have the same on/off state. Clicking one of them will turn all of them on. If the f_RadiosInUnison is not set, clicking one widget will put all others (of the same radio button field) into the off state. See getValueIndex() for details. Signature fields have exactly one widget. Fields of other types must have at least one widget. Other fields such as text fields (except for signature fields) also can have multiple widgets, but all of them display the same value. Signature fields in PDF documents are invisible if their width is zero or if their height is zero, that is, if the coordinates set by setLeft() and setRight() are equal or if the coordinates set by setBottom() and setTop()) are equal.
can have multiple widgets, but all of them display the same value.

Constructor:

- SignDocField()
.

All fields have a type, a name, and flags:
- getType()
- setType()
- getName()
- setName()
- getFlags()
- setFlags()
.

Fields in PDF documents can have an alternate name which is used
for displaying the field name in a user interface:
- getAlternateName()
- setAlternateName()
.

Moreover, fields in PDF documents can have a mapping name which is
used for exporting field data:
- getMappingName()
- setMappingName()
.

Most fields in PDF documents can have one or more value:
- getValueCount()
- getValue()
- clearValues()
- addValue()
- setValue()
- removeValue()
- getValueIndex()
- setValueIndex()
- clickButton()
- getMaxLen()
- setMaxLen()
.

List boxes and combo boxes can have multiple possible choices:
- getChoiceCount()
- getChoiceValue()
- getChoiceExport()
- clearChoices()
- addChoice()
- setChoice()
- removeChoice()
- getTopIndex()
- setTopIndex()
.

Fields have one or more widget annotation:
- getWidgetCount()
- getWidget()
- selectWidget()
- addWidget()
- insertWidget()
- removeWidget()
.

Each widget annotation has a couple of flags:
- getWidgetFlags()
- setWidgetFlags()
.
Each widget annotation has a position on a page:
- getPage()
- setPage()
- getLeft()
- setLeft()
- getBottom()
- setBottom()
- getRight()
- setRight()
- getTop()
- setTop()
- getRotation()
- setRotation()
.
Radio button widgets and check box widgets have a button value (see above):
- getButtonValue()
- setButtonValue()
.
Text in a widget is controlled by these functions:
- getJustification()
- setJustification()
- getTextFieldAttributes()
- setTextFieldAttributes()
.
The background color of a widget can be set:
- getBackgroundColor()
- setBackgroundColor()
.
The border of a widget is controlled by these functions:
- getBorderColor()
- setBorderColor()
- getBorderWidth()
- setBorderWidth()
- getBorderStyle()
- setBorderStyle()
.
Radio button widgets and Check box widgets can display various
symbols:
- getButtonStyle()
- setButtonStyle()
.

The following functions can be used for signature fields only:
- getDocMDP()
- getSignatureType()
- isCurrentlyClearable()
- isSigned()
.

Signing signature fields in a PDF document can automatically lock
other fields:
- getLockType()
- setLockType()
- getLockFieldCount()
- getLockField()
- clearLockFields()
- addLockField()
- setLockField()
- removeLockField()
-getLockMDP()
-setLocKMDP()
.

Signature fields in a PDF document can have a signature field
seed value dictionary controlling various aspects of signing.
It can restrict the certificates that can be used for signing:
- getCertSeedValueFlags()
- setCertSeedValueFlags()
.
The certificate can be restricted by subject distinguished name:
- getCertSeedValueSubjectDNCount()
- getCertSeedValueSubjectDN()
- clearCertSeedValueSubjectDNs()
- addCertSeedValueSubjectDN()
- setCertSeedValueSubjectDN()
- setCertSeedValueSubjectDN()
- removeCertSeedValueSubjectDN()
.
The certificate can be restricted by specifying acceptable
signing certificates:
- getCertSeedValueSubjectCertificateCount()
- getCertSeedValueSubjectCertificate()
- clearCertSeedValueSubjectCertificates()
- addCertSeedValueSubjectCertificate()
- setCertSeedValueSubjectCertificate()
- setCertSeedValueSubjectCertificate()
- removeCertSeedValueSubjectCertificate()
.
The certificate can be restricted by specifying acceptable
issuer certificates:
- getCertSeedValueIssuerCertificateCount()
- getCertSeedValueIssuerCertificate()
- clearCertSeedValueIssuerCertificates()
- addCertSeedValueIssuerCertificate()
- setCertSeedValueIssuerCertificate()
- setCertSeedValueIssuerCertificate()
- removeCertSeedValueIssuerCertificate()
.
And the certificate can be restricted by policy:
- getCertSeedValuePolicyCount()
- getCertSeedValuePolicy()
- clearCertSeedValuePolicies()
- addCertSeedValuePolicy()
- setCertSeedValuePolicy()
- setCertSeedValuePolicy()
- removeCertSeedValuePolicy()
.

The signature field seed value dictionary can specify an RFC 3161
time-stamp server:
- getSeedValueTimeStampServerURL()
- getSeedValueTimeStampRequired()
- setSeedValueTimeStamp()
.

The signature field seed value dictionary can specify a signature
handler (Filter):
- getSeedValueFilter()
- getSeedValueFilterRequired()
- setSeedValueFilter()
.

The signature field seed value dictionary can specify signing
methods (SubFilter):
- getSeedValueSubFilterCount()
- getSeedValueSubFilter()
- getSeedValueSubFilterRequired()
- setSeedValueSubFilterRequired()
- clearSeedValueSubFilters()
- addSeedValueSubFilter()
- setSeedValueSubFilter()
- removeSeedValueSubFilter()
.

The signature field seed value dictionary can specify a hash
algorithms (DigestMethod):
- getSeedValueDigestMethodCount()
- getSeedValueDigestMethod()
- getSeedValueDigestMethodRequired()
- setSeedValueDigestMethodRequired()
- clearSeedValueDigestMethods()
- addSeedValueDigestMethod()
- setSeedValueDigestMethod()
- removeSeedValueDigestMethod()
.

The signature field seed value dictionary can specify whether adding
revocation to the signature is mandatory:
- getSeedValueAddRevInfo()
- setSeedValueAddRevInfo()
.

The signature field seed value dictionary can specify what changes
shall be allowed after signing the signature field :
-getSeedValueMDP()
-setSeedValueMDP()
.

The color of an empty signature field in a TIFF document can be
specified:
- getEmptyFieldColor()
- setEmptyFieldColor()
.
See Also