Disable Link button in IOS

WebViewer Version: 10.9.0

Please give a brief summary of your issue:
I want to disable link button under insert tab in IOS.

Please describe your issue and provide steps to reproduce it:
Before pdftron upgrade to 10.9.0 from 9.0.1, link button was not present.
We saw this new annotation link after upgrade. Is there any way to hide this button as it is not working as expected? no popup is displayed in ios like android link annotation.
image

1 Like

PDFTron.iOS version is 10.9.0

1 Like

Hello, and thank you for reaching out for Support through our forum. You can remove items from a tool group using this guide: Viewer-configuration | Apryse Documentation

And here is a code Snippet for removing the link tool item specifically:


// tool buttons that exist currently
guard let defaultInsertGroupTools = insertItemGroup.barButtonItems else {return}

// new set of tools to replace current ones
var newInsertGroupTools = [UIBarButtonItem]()

// add all currently existing tools except for the ones we don't want
for defaultToolItem in defaultInsertGroupTools
{
    if defaultToolItem.isKind(of: PTToolBarButtonItem.self),
       let toolBarButton = defaultToolItem as? PTToolBarButtonItem
    {
        if toolBarButton.toolClass == PTLinkCreate.self
        {
            // do not add this tool
            continue
        }
        else
        {
            newInsertGroupTools.append(toolBarButton)
        }
    }
    else
    {
        newInsertGroupTools.append(defaultToolItem)
    }
}

// assign tools to new array
documentController.toolGroupManager.insertItemGroup.barButtonItems = newInsertGroupTools
type or paste code here
1 Like