CPDFOnInterceptAnnotationActionCallback typedef
CPDFOnInterceptAnnotationActionCallback =
void Function(CPDFAnnotation annotation)
Callback for intercepting default actions of note and hyperlink annotations.
Other annotation taps remain SDK selection or editing gestures. In viewer mode, note annotations have no default edit action and are not intercepted. Use CPDFAnnotationsConfig.interceptAnnotationActions or CPDFAnnotationsConfig.interceptAllAnnotationActions to configure this callback.
Configuration Example:
CPDFConfiguration config = CPDFConfiguration(
annotationsConfig: CPDFAnnotationsConfig(
annotationAuthor: PreferencesService.documentAuthor,
interceptAnnotationActions: [
CPDFAnnotationType.note,
CPDFAnnotationType.link,
]
),
);
CPDFReaderWidget(
document: widget.documentPath,
configuration: config,
onInterceptAnnotationActionCallback: (CPDFAnnotation annotation) {
// Handle annotation tap event
}
);
Implementation
typedef CPDFOnInterceptAnnotationActionCallback = void Function(
CPDFAnnotation annotation);