Skip to content

Enable/disable annotation editing Deo #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mutumbakato
Copy link
Collaborator

Details

This pull request introduces support for enabling and disabling annotation editing in the Nutrient Flutter plugin. The changes span Android, iOS, and Dart implementations, providing a unified API for managing annotation editing capabilities. Additionally, an example showcasing this functionality has been added to the project.

Feature Implementation: Annotation Editing

Android Changes:

  • Added new method enableAnnotationEditing in PspdfkitViewImpl to update PdfActivityConfiguration dynamically for enabling or disabling annotation editing.
  • Updated PspdfkitWidgetControllerApi interface and its message handler to include the enableAnnotationEditing method. [1] [2]

iOS Changes:

  • Added enableAnnotationEditing method in PspdfkitPlatformViewImpl to modify editableAnnotationTypes in the PDF view controller configuration based on the provided parameters.
  • Updated PspdfkitWidgetControllerApi protocol and its message handler for the new method. [1] [2]

Dart API Updates:

  • Added enableAnnotationEditing method in PspdfkitWidgetController and its implementations (PspdfkitWidgetControllerImpl, PspdfkitWidgetControllerNative, and PspdfkitWidgetControllerWeb). [1] [2] [3] [4]
  • Updated generated Dart API files to include the new method. [1] [2]

Example Addition:

  • Added a new example DisableAnnotationEditingExample to demonstrate the usage of the enableAnnotationEditing method, allowing users to toggle annotation editing via a button.
  • Integrated the example into the list of available examples in the project. [1] [2]

Miscellaneous Updates:

  • Regenerated API files for Android, iOS, and Dart to reflect changes introduced by the new method. [1] [2] [3]

These changes collectively enhance the PSPDFKit Flutter plugin by providing a flexible API for annotation editing, along with a practical example to help you understand and utilize the feature effectively. We will add this feature to our roadmap for future implementation.

Copy link
Collaborator Author

@mutumbakato mutumbakato May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by pigeon.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by pigeon.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by pigeon.

@@ -251,4 +251,11 @@ class PspdfkitWidgetControllerWeb extends PspdfkitWidgetController
Future<double> getZoomScale(int pageIndex) {
return pspdfkitInstance.getZoomScale(pageIndex);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pigeon method definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant