Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


Creates an empty signature field which can be used to digitally sign the PDF file.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 4.2 Yes Yes Yes Yes Yes

MBS( "DynaPDF.CreateSigField"; PDF; Name; ExpValue; Checked; Parent; PosX; PosY; Width; Height )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Name Name of the field "IsMale"
ExpValue Export value (required) "IsMale"
Checked If 1, the check box appears checked. Else pass 0 for unchecked. 0
Parent Parent group field if any or -1. -1
PosX X-Coordinate of the text field. 100
PosY Y-Coordinate of the text field. 100
Width Width of the text field. 100
Height Height of the text field. 20


Returns handle or error message.


Creates an empty signature field which can be used to digitally sign the PDF file.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the signature field. If the coordinate system is top-down it defines the upper left corner.

Like all form fields, the width and height is measured incl. the line width of the border. The size of normal vector graphics is measured without the line width; this must be taken into account when calculating the width or height of a form field. The line width of the border is derived from the current graphics state (see DynaPDF.SetLineWidth), it should be either 0, 1, 2, or 3 units (no border, thin, medium, or thick). The border style can be changed with the functions DynaPDF.SetBorderStyle or DynaPDF.SetFieldBorderStyle.
If the PDF file should be digitally signed by DynaPDF call the function DynaPDF.CloseAndSignFile or DynaPDF.CloseAndSignFileEx after all pages has been created. The first signature field is used for signing if multiple signature fields exist. In this case it is also possible to create a user defined appearance for the signature field. See CreateSigFieldAP() for further information.

A signature field can be visible or invisible depending on your requirements. To create a hidden signature field set the flag ffHidden to the field (see also DynaPDF.SetFieldFlags).

How to lock an Interactive Form after signing?

If an Interactive Form should be filled in and signed within the full version of Adobe's Acrobat 4 or higher then it is possible to create an empty signature field which executes a special JavaScript Action to lock the form after it has been signed. This can be done with a JavaScript Action which contains the JavaScript function AFSignature_Format(). This function can be called within the OnFormat event of the signature field. Note that this is the one and only event that signature fields support.

The function supports two parameters, the first parameter defines whether all or only specific fields should be locked, the second parameter contains either an empty array or an array of full qualified field names delimited by a comma:

If a form contains a button with a Submit Form Action then it is recommended to exclude the button field from locking so that it is still possible to submit the form data. Otherwise, the entire form is locked, incl. the submit button, and it is impossible to submit the form data to a web server.

See also CreateSigField function in DynaPDF manual.

See also

DynaPDF.CreateSeparationCS   -   DynaPDF.CreateSigFieldAP

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins