This repository was archived by the owner on May 15, 2025. It is now read-only.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
This branch introduces many features as per requirements and fixes few warnings from old deprecated APIs. Below listed features are introduced corresponding to platforms.
Feature (1)
Previously, when we were adding annotations PSPDFKit library over a pdf document, it prompt us to enter author name on every new document. A boolean field
askForAnnotationUsernameintroduced to either we want this functionality or not. In addition to the same issue, a new fielddefaultAuthorNameis introduced to add a default author name.Code example:
Test result flutter: Android [ ✅ ] & iOS [ ✅ ]
Feature (2)
Previously, when
enableAnnotationEditingwasfalse, it was correctly preventing annotations for being editing but from a tabview where we navigate from an outline button had a list of annotations of all the pdf pages, there, on iOS we were still able to swipe-to-delete annotations but the annotations were not actually deleted but the behaviour were existed which was causing confusion. And on Android, tapping or editing an disabled annotation from the annotation list leading to app crash.Now, a new boolean field
allowAnnotationDeletionis introduced which work along withenableAnnotationEditingto fix the above issues.on iOS: when above mentioned both fields are
false, annotation editing is disabled and we cannot anymore interact with the annotation list since the editing was disabled in this PR.on Android: when above mentioned both fields are
false, annotation editing is disabled and the annotation list is removed from tabview.Reason of removing the annotation list tab: When editing was false, interacting with annotations from the list was leading to an app crash on Android, saying
com.pspdfkit.exceptions.PSPDFKitException: Entering annotation editing mode for [] is not permitted, either by the license or configurationand since we're not exposed to edit the UI code to manually disable the behaviour of the annotation list on android side and just doing.disableAnnotationList()which is the only callback they provide which I did leads to remove the complete tab from the tabview preventing crash.Test result flutter: Android [ ✅ ] & iOS [ ✅ ]
Feature (3)
Previously, when I tried to add annotation configuration using
.setAnnotationConfigurationmethod fromPspdfkitWidgetControllerit was throwing Missing Plugin Implementation for a method. It was the problem with, we were invoking a method with nameannotationConfigurationbut on platform specific side the code was accessing the method asannotationPresentConfiguration. Syncing the names make it work. Now, we're able to add default config for pdf document including default thickness, colour and more.Test result flutter: Android [ ✅ ] & iOS [ ✅ ]
Feature (4)
Previously, I figured out,
onAnnotationsChangedcallback was only working on iOS and wasn't implemented on Android. I added callbacks to Android side and now callbacks are send toonAnnotationsChangedeven on Android.Test result flutter: Android [ ✅ ] & iOS [ ✅ ]
Moreover, on Android, there were few warnings to missing
@Deprecateddecoration over some deprecated methods and properties. I added this and now we're no more receiving these warnings on Android.Acceptance Criteria