2

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.

david.schreiber
  • 3,851
  • 2
  • 28
  • 46
MauroAlexandro
  • 347
  • 3
  • 6
  • 18

1 Answers1

1

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!!

david.schreiber
  • 3,851
  • 2
  • 28
  • 46
MauroAlexandro
  • 347
  • 3
  • 6
  • 18
  • 1
    MauroAlexandro you are right! What you are experiencing is a stale render cache that can be avoided by clearing using `PSPDFKit#clearCaches`. Please note that calling this method will clear caches for _all other documents as well_. Hence use sparingly. We're working on an improved cache management API, so stay tuned ;-) – david.schreiber Sep 06 '16 at 19:20
  • 1
    As a side-note: We (the PSPDFKit team) can't actively follow all StackOverflow questions. We have a great custom support team that is immensely responsive and will answer your questions at https://pspdfkit.com/support/request – david.schreiber Sep 06 '16 at 19:24