You will need to use ToolManager for PDF interaction tools to work. You can build it easily using ToolManagerBuilder, a helper class for configuring and creating ToolManager. It also sets ToolManager to a specific PDFViewCtrl.
To build a default ToolManager, use ToolManagerBuilder and pass in an instance of PDFViewCtrl:
You can customize the ToolManager programmatically with ToolManagerBuilder:
Image stamps and image signatures require a source image in order to create the annotation. If you are using PDFViewCtrl with ToolManager, will need to handle this manually in your app by implementing the methods ToolManager.AdvancedAnnotationListener.imageStamperSelected(PointF) and ToolManager.AdvancedAnnotationListener.imageSignatureSelected(PointF, int, Long).
For reference you can check out our PDFViewCtrl integration guide here
You can also customize the ToolManager by defining an Android style resource and passing it to ToolManagerBuilder:
res/values/styles.xml file:For additional customization, a list of supported style attributes are defined in this table.@array/disable_tool_modes is a string array defining tool modes that should be disabled. You can define it in res/values/arrays.xml:Each <item> in the array needs to be a string matching one of the enum values from ToolManager.ToolMode.You can also set up ToolManagerBuilder programmatically. For a list of settings available, see the ToolManagerBuilder API.
ToolManager using ToolManagerBuilder and pass in your custom style and an instance of PDFViewCtrl:Alternatively, you can pass the ToolManager style resource directly to ViewerConfig.Builder. You can learn more about configuring ToolManager with ViewerConfig in the viewer configuration guides.Attributes | Description | Format |
|---|---|---|
| Controls whether editing ink annotations is allowed (only works if annotation toolbar is present) | Format: boolean |
| Whether annotation toolbar should open when Ink is selected from quick menu (only works if annotation toolbar is present) | Format: boolean |
| Whether to use/show the built-in page number indicator | Format: boolean |
| Whether to check annotation author's permission | Format: boolean |
| Whether to show author dialog the first time the user annotates | Format: boolean |
| Whether to copy marked-up text of TextMarkup annot to annotation's 'content' property upon TextMarkup annotation creation | Format: boolean |
| Whether to enable using stylus to draw without having to enter ink tool | Format: boolean |
| Whether to smooth ink annotations | Format: boolean |
| Whether to auto-select annotations after they are created | Format: boolean |
| Whether disable showing quick menu | Format: boolean |
| Whether double-tapping should zoom the viewer | Format: boolean |
| Whether can auto resize free text bounding box when editing | Format: boolean |
| Whether annotation editing is real time | Format: boolean |
| Whether can edit freetext on tap | Format: boolean |
| Whether can show saved signatures in signature dialog | Format: boolean |
| Whether can show indicator for annotations with comments | Format: boolean |
| Array of tools to disable | Format: reference |
| Array of annotation types to disable editing | Format: reference |
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales