On this page
Delete Annotations
You can remove all annotations from the current document by calling the removeAllAnnotations()
method.
- The return value is a boolean indicating whether the operation was successful.
Example code:
tsx
const pdfReaderRef = useRef<CPDFReaderView>(null);
<CPDFReaderView
ref={pdfReaderRef}
document={samplePDF}
configuration={ComPDFKit.getDefaultConfig({
})}/>
const removeResult = await pdfReaderRef.current?.removeAllAnnotations();
Note: This method does not delete hyperlink annotations.