The following example hides text highlight and arrow annotation creation tool from the quick menu and annotation toolbar:
To use in ToolManagerBuilder
:
To use in ToolManager
:
To disable annotation editing for certain annotation type(s), you can set it in a centralized place with either ToolManagerBuilder
or ToolManager
depending on the fit.
The following example disables editing of ellipse and rectangle annotations:
To use in ToolManagerBuilder
:
To use in ToolManager
:
Functionality that is not directly tied to annotation creation or editing such as text selection, form filling, link following etc. can also be disabled. Each functionality is in the form of a Tool
. Once a Tool
is disabled, ToolManager
will never switch to it. Instead, it will switch to the Pan
tool. Pan
tool cannot be disabled.
The following example disables form filling and link following:
To use in ToolManagerBuilder
:
To use in ToolManager
:
Open file src/android/com/pdftron/cordova/PDFTron.java
.
Add the method key that matches the JS declaration:
In the same file, src/android/com/pdftron/cordova/PDFTron.java
, find entry point execute
method:
The actual implementation will depend on the actual functionality.
### 5. Push the code and integrate the updated plugin
Push your changes back to your forked copy of the repo.
Next, from the command line, navigate to the root of your Cordova app project and remove the Apryse Cordova plugin as follows:
Then integrate your forked copy of the repo with the changes, using the appropriate names for your Git(Hub) name/repo:
The new method is now ready to use.
Note that if you later on need to update any code in the plugin (for example to add another method, or to fix a bug), you will need to remove and re-add the Cordova plugin every time in order to make the changes visible to your app.
The app can now access the new API as follows:
If you're only developing for Android, then you're all done!
If you're also deploying on iOS, you'll need to repeat steps 3 and 4 for iOS.
If you're developing for both iOS and Android, please consider submitting a PR, as upstreaming the change will simplify your developing and make the API available for other Apryse customers.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales