What are the annotation properties associated with?

WebViewer Version: 8.8

Previous developer used annotations properties that weren’t intended to be used. I know these values mutate and would like to use the correct annotation properties.
Screen Shot 2023-01-23 at 3.39.42 PM
Above he used the bp property that was originally in our codebase as Bn. Is there any documentation that correlates these keys to annotation properties.

We have a placeholder annotation that is checking if the required flag was set

 var required = placeholder.bp['trn-form-field-required']
            ? placeholder.bp['trn-form-field-required']
            : false;

Please provide a link to a minimal sample where the issue is reproducible:
https://community.pdftron.com/t/what-are-these-annotation-properties/6968

Hi @simonj,

There is no way to map the obfuscated properties to the actual annotation properties. However, most of the time it’s possible to figure out what it is based on its context and then use a correct property/getter/setter.

For this one you can use existing a method in the form field creation manager to extract this info:

So your code would be:

// First we get the FormFieldCreation manager
const formFieldCreationManager = instance.Core.annotationManager.getFormFieldCreationManager();
const required = formFieldCreationManager.getFieldFlag(placeHolder, 'trn-form-field-required');

For an object with all the supported labels used in the form field manager you can call getFieldLabels

Hopefully that clears things up.

Best Regards,
Armando Bollain
Software Developer
PDFTron Systems, Inc.