Multiple custom data in FreeTextAnnotation

Product: PDFTron

Product Version: 10.8.0

I want to set multiple custom data for a FreeTextAnnotation.
Is that possible and if yes then how?

I have tried using the following

      // textAnnot.setCustomData("autoFont", true);
      // textAnnot.setCustomData("fieldName", formFieldNameWithSeq);

Only one data is kept and the other is null.

and

textAnnot.setCustomData({
        fieldName: formFieldNameWithSeq,
        autoFont: true,
      });

Does not work

Any help will be appreciated

Thanks,
Subhra

Yes. You can add rich-text content to a free text annotation. We have an example that should show you how to implmenet here:
Rich text support in FreeText Annotations

Please take a look and let us know if you have any questions.

Hi, I don’t want to enable rich text in annotation.

I want to set multiple custom data for FreeTextAnnotations.
Currently I can add only one custom data using setCustomData() function.

But I want to store multiple custom data using the same method.

I want to set multiple custom data for FreeTextAnnotations.
Using rich text is how you do this, not via setCustomData.

Hi, I use
let textAnnot = new Annotations.FreeTextAnnotation();
for creating FreeTextAnnotations. ‘Core.Annotations.FreeTextAnnotation’ and not ‘Core.PDFNet.FreetextAnnot’

And I don’t see GetSDFObj() function available for ‘FreeTextAnnotations’ in the API documentation → Apryse WebViewer Class: FreeTextAnnotation

Hi Subhra,

To access the SDF object in WebViewer you need to enable the full API when initializing, which enables the complete PDF SDK, browser side. Here are some documentation and guilds on getting the full API enabled:
Setup: Setup | Apryse Documentation
Samples: Full-apis | Apryse Documentation
Annotations: Annotationtest | Apryse Documentation

Let me know if you have any questions.