Disable signature form fields only

Product: PDFTron iOS SDK

Product Version: 3.0.4-4

Please give a brief summary of your issue:
I have been trying to display the PDF viewers to users, and I want to allow them to edit all kinds of form fields except for signature fields. I used this line of code toolManager.signatureAnnotationOptions.canCreate = NO but it does not work as expected. How do I achieve the expected result?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

Hello Thái,

Thank you for contacting WebViewer Forums.

To disable signature form fields, we can call the disableElements() API:

instance.UI.disableElements(['signatureFieldToolGroupButton'])

Regards,
Luke

Hi Luke, thank you for your reply. However, my question is about iOS SDK, not WebViewer.
I don’t know how to edit my original post but the version is actually 10.9.0

Thank you for reaching out for support in our forum! In order to achieve what you are trying,
Implement or override the following PTToolManagerDelegate method, and return false for signature-widget annotations.

https://docs.apryse.com/api/ios/Protocols/PTToolManagerDelegate.html#/c:objc(pl)PTToolManagerDelegate(im)toolManager:shouldInteractWithForm:onPageNumber:

To check if an annotation is a signature widget in the delegate method linked above, you could do the following:

if ([annotation IsValid] && [annotation GetType] == e_ptWidget) {
    PTWidget *widget = [[PTWidget alloc] initWithAnn:annotation];
    if ([widget IsValid]) {
        PTField *field = [widget GetField];
        if ([field IsValid] && [field GetType] == e_ptsignature) {
            // This is a signature field and widget.
            return NO; // Do not allow interaction with the signature form field widget.
        }
    }
}
return YES; // Allow interaction with the form field widget.