Search code examples
androidpspdfkit

PSPDFKit keeps annotation on cache on Android


On PSPDFKit I make annotations on a PDF file and then I save it. But if I re-download the same file without the annotations, somehow PSPDFKit opens that file but with the same annotations still visible.

I've tried to open with Adobe Reader and the annotations are gone.

It only refreshes if I close the app and open it again.


Solution

  • Ok I've found a method to do that and I am going to share with you. You can use PSPDFKit#clearCaches like this:

    PSPDFKit.clearCaches(this, true);
    

    Done, cache cleared!!