CPDFOnInterceptAnnotationActionCallback typedef

CPDFOnInterceptAnnotationActionCallback = void Function(CPDFAnnotation annotation)

Callback for intercepting annotation actions (note and hyperlink annotations).

Used to configure interception of note and hyperlink annotation tap actions in CPDFConfiguration, and dispatch the events to the Flutter side for handling.

Configuration Example:

CPDFConfiguration config = CPDFConfiguration(
  annotationsConfig: CPDFAnnotationsConfig(
    annotationAuthor: PreferencesService.documentAuthor,
    interceptLinkAction: true,
    interceptNoteAction: true
  ),
);

CPDFReaderWidget(
  document: widget.documentPath,
  configuration: config,
  onInterceptAnnotationActionCallback: (CPDFAnnotation annotation) {
    // Handle annotation tap event
  }
);

Implementation

typedef CPDFOnInterceptAnnotationActionCallback = void Function(CPDFAnnotation annotation);