Some test text!

keyboard_arrow_down

Get started

Quick start - view a documentDownload PDFTron SDKIntegrate with GradleIntegrate manuallyRun samplesAdd license keyUpdate to latest versionTroubleshooting
keyboard_arrow_down

FAQ

System requirementsDocument lockingDocument savingRun project in Android StudioRun project with source codePDFTron full vs. standardReduce size of APK
keyboard_arrow_down

Document Viewer

keyboard_arrow_down

Document Viewer components

keyboard_arrow_down

Annotation and collaboration

keyboard_arrow_down

Advanced customization

OverviewAdd a custom view to a pageCreate a custom toolPage coloring modePage fit modePage layout modeScrolling directionRight-to-left support
keyboard_arrow_down

Conversion

keyboard_arrow_down

Parsing and extraction

keyboard_arrow_down

Digital signatures

keyboard_arrow_down

Search

keyboard_arrow_down

Advanced topics

PrintUnderstand coordinatesGenerate page thumbnailsChange annotation propertiesDelete annotationsTool class hierarchy
keyboard_arrow_down

Other frameworks

keyboard_arrow_down

Troubleshooting

keyboard_arrow_down

Reference

keyboard_arrow_down

PDF Processing API

What is PDFNet?Opening a documentSerializing (saving) a documentWorking with pagesWorking with Page ContentWorking with BookmarksWorking with Interactive Forms (AcroForms)PDF SecurityLow-level PDF APIError handling
Delete annotationskeyboard_arrow_down

Delete annotations

In this document
chevron_rightDelete an annotation
chevron_rightDelete all annotations on a page
chevron_rightDelete all the annotations in a PDF document

Using the PDFTron library, you can delete a single annotation, delete all the annotations on a page, or delete all the annotations in a PDF document.

The PDFTron library has an annotation list dialog fragment. The dialog fragment allows users to delete annotations easily. For more information, see annotation dialog fragment.
To delete an annotation, you need the page number of the annotation. To avoid looping through the whole document to find the page number of the annotation, we recommend you always keep track of the page number when you get an annotation.

linkDelete an annotation

To delete an annotation, you need to lock PDFViewCtrl first. See the section on document locking for more information.

You can delete an annotation as follows:

linkDelete all annotations on a page

The following snippet shows how to enumerate all the annotations on a page, as well as how to delete them.

linkDelete all the annotations in a PDF document

The following snippet shows how to traverse all the pages in a PDF document and delete all the annotations.