Remove Font Selector

Product: PDFTron

Product Version: Latest

Please give a brief summary of your issue:
We only want to support one font (Arial) on iOS. The default is current is Helvetica. How would I set the default and remove the ability to select a different font? Users call select the font from a free text or a call out annotation.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi Jack,

You can achieve this by subclassing the PTAnnotStyle class and overriding the availableStyleKeys property. Then removing the “AnnotStyleKeyFont” key from the list of keys.

To override a class have a look at this guide: PDFTron Systems Inc. | Documentation

The code would look something like this:

class CustomPTAnnotStyle: PTAnnotStyle {
    override var availableStyleKeys: [PTAnnotStyleKey] {
        get {
            return super.availableStyleKeys.filter { key in
                key != PTAnnotStyleKey.font
            }
        }
    }
}

Please let us know if this works for you.

Best Regards,
Sahil Behl.