Click or drag to resize

PdfFormFormHasSignatures Property

Gets a value indicating whether form has signature fields.

Namespace:  Atalasoft.PdfDoc.Generating.Forms
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public bool FormHasSignatures { get; }

Property Value

Type: Boolean
true if the form has signatures; otherwise, false.
Remarks
This is meant to be a hint to viewers and may not have been set properly by the generating software. When a PdfGeneratedDocument has been constructed from and existing PDF, this property will reflect the content of the file (correct or not). Upon writing out a document, DotPdf will automatically set this property for you, defaulting it to false and setting it to true if DotPdf encounters either a SignatureFormField or a SignatureWidgetAnnotation.
Examples
If you want to determine if a form has fields, you can use this code:
public static bool HasField(PdfForm form)
{
    if (form == null) return false;
    foreach (IFormElement elem in FormVisitor.BreadthFirst())
    {
        if (elem is SignatureFormField || elem is SignatureWidgetAnnotation)
            return true;
    }
    return false;
}
See Also