Adding custom styles to read only checkboxes

Hello @dfelix

i tried it, but to be honest, it doesn’t work as excpected or at least i’m doing something wrong. I made a very simple example based on your webviewer-angular-example, with webviewer version 8.10.0.

I have a minimal example PDF with three checkboxes and two radiobuttons:

I know load the file into the WebViewer and it looks as expected:
image

As next step i wan’t the checkboxes and radiobuttons to be immutable. I thought it’s enough to set isReadOnly to true as follows:

    WebViewer({
      path: '../lib',
      initialDoc: '../files/example.pdf',
      isReadOnly: true
    }, this.viewer.nativeElement).then(instance => {
      this.wvInstance = instance;

This changes the menues, so that no Annontation-Functions are available, but the formfields are still mutable:

image

So i ended up setting the formfields readonly by myself as follows:

        fieldList.forEach(field => {
          field.flags.set('ReadOnly', true);
        });

Then i have the problem, that checkmarks and radiobuttons are hard to read:
image

I tried to change the color as you suggested, but ther is not “font” property in annotation and annotation.Color has no effect:

        annotationsList.forEach(annotation => {
          annotation.Color = new Annotations.Color(255, 0, 0);
        });

There is a field.font.fillColor = new Annotations.Color(255, 0, 0);, which indeed changes the color to red but only when the flag ReadOnly is not set.

Am i missing something here?

Thanks you

Christian