pspdfkit-flutter icon indicating copy to clipboard operation
pspdfkit-flutter copied to clipboard

Exposed a few additional APIs

Open sarbogast opened this issue 4 months ago • 0 comments

Details

In order to integrate PSPDFKit into my Flutter application, I needed a few additional APIs to be exposed:

  • the restoreLastViewedPage flag to have the possibility to disable this restoration when switching from one PDF to another
  • a notification when the user leaves the annotation creation mode by clicking the close button in the annotation toolbar
  • a method to programmatically enter into annotation creation mode so that I can hide the toolbar and do this from my own UI
  • a method to programmatically jump to a specific page, to enable navigation from my own UI
  • a method to determine whether the viewer is currently displaying 2 pages or just one, in case pageLayoutMode is automatic and the viewer decides how many pages to show based on orientation

For now, custom methods are only implemented in iOS and Android, not on the web as I didn't need them there.

Acceptance Criteria

  • [X] Before merging retest all the examples to make sure that they work on both Android and iOS.

sarbogast avatar Sep 30 '24 15:09 sarbogast