ComPDFKit Web SDK
    Preparing search index...

    Function setAnnotationReadState

    • Sets the read state of an annotation (all are read by default). Unread items show a blue frame and dot in the notes list and become read when clicked.

      Parameters

      • options: { annotationId: string; isRead: boolean }

        { isRead, annotationId }.

        • annotationId: string

          The id of the annotation.

        • isRead: boolean

          false marks the annotation unread.

      Returns void

      const { annotationManager } = instance.Core;
      annotationManager.addEventListener('annotationChanged', (annotations, action, { imported }) => {
      if (action === 'add' && imported)
      annotations.forEach(annotation => instance.UI.setAnnotationReadState({ isRead: false, annotationId: annotation.Id }));
      });