PTSignatureWidget

@interface PTSignatureWidget : PTWidget

An object representing a Signature used in a PDF Form. These Widgets can be signed directly, or signed using a DigitalSignatureField.

  • Creates a SignatureWidget annotation and initializes it using given Cos/SDF object.

    Note

    The constructor does not copy any data, but is instead the logical equivalent of a type cast.

    Declaration

    Objective-C

    - (instancetype)initWithD:(PTObj *)d;

    Swift

    init!(d: PTObj!)

    Parameters

    d

    the input Cos/SDF object

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithAnnot: (PTAnnot*)annot;

    Swift

    init!(annot: PTAnnot!)
  • Retrieves the DigitalSignatureField associated with this SignatureWidget.

    Declaration

    Objective-C

    - (PTDigitalSignatureField *)GetDigitalSignatureField;

    Swift

    func getDigitalSignatureField() -> PTDigitalSignatureField!

    Return Value

    A DigitalSignatureField object representing the digital signature form field associated with this signature widget annotation.

  • A function that will create and add an appearance to this widget by centering an image within it.

    Declaration

    Objective-C

    - (void)CreateSignatureAppearance:(PTImage *)img;

    Swift

    func createSignatureAppearance(_ img: PTImage!)

    Parameters

    img

    A PDF::Image object representing the image to use.

  • Creates a new SignatureWidget annotation in the specified document, and adds an associated signature form field to the document.

    Declaration

    Objective-C

    + (PTSignatureWidget *)Create:(PTPDFDoc *)doc
                              pos:(PTPDFRect *)pos
                       field_name:(NSString *)field_name;

    Swift

    class func create(_ doc: PTPDFDoc!, pos: PTPDFRect!, field_name: String!) -> PTSignatureWidget!

    Parameters

    doc

    The document to which the widget is to be added.

    pos

    A rectangle specifying the widget’s bounds in default user space units.

    field_name

    The name of the digital signature field to create. Optional - autogenerated by default.

    Return Value

    A newly-created blank SignatureWidget annotation.

  • Creates a new SignatureWidget annotation associated with a particular form field in the specified document.

    Declaration

    Objective-C

    + (PTSignatureWidget *)CreateWithField:(PTPDFDoc *)doc
                                       pos:(PTPDFRect *)pos
                                     field:(PTField *)field;

    Swift

    class func create(withField doc: PTPDFDoc!, pos: PTPDFRect!, field: PTField!) -> PTSignatureWidget!

    Parameters

    doc

    The document to which the widget is to be added.

    pos

    A rectangle specifying the widget’s bounds in default user space units.

    field

    The digital signature field for which to create a signature widget.

    Return Value

    A newly-created blank SignatureWidget annotation.

  • Creates a new SignatureWidget annotation associated with a particular DigitalSignatureField object (representing a signature-type form field) in the specified document.

    Declaration

    Objective-C

    + (PTSignatureWidget *)
        CreateWithDigitalSignatureField:(PTPDFDoc *)doc
                                    pos:(PTPDFRect *)pos
                                  field:(PTDigitalSignatureField *)field;

    Swift

    class func create(withDigitalSignatureField doc: PTPDFDoc!, pos: PTPDFRect!, field: PTDigitalSignatureField!) -> PTSignatureWidget!

    Parameters

    doc

    The document to which the widget is to be added.

    pos

    A rectangle specifying the widget’s bounds in default user space units.

    field

    The digital signature field for which to create a signature widget.

    Return Value

    A newly-created blank SignatureWidget annotation.