Image Annotation

Product:PDFTron Android SDK

Product Version:9.2.0

Please give a brief summary of your issue:
(Think of this as an email subject)
How to use Image Tool for Image Annotation?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

I wanted to add Image annotation similar like Pen or Arrow Annotation.
Here, i have customised the tool
mAnnotationToolbarComponent.inflateWithBuilder(
AnnotationToolbarBuilder.withTag(“Custom Toolbar”)
.addToolButton(ToolbarButtonType.SQUARE, DefaultToolbars.ButtonId.SQUARE.value())
.addToolButton(ToolbarButtonType.INK, DefaultToolbars.ButtonId.INK.value())
.addToolButton(
ToolbarButtonType.FREE_HIGHLIGHT,
DefaultToolbars.ButtonId.FREE_HIGHLIGHT.value()
)
.addToolButton(ToolbarButtonType.IMAGE, DefaultToolbars.ButtonId.IMAGE.value())
.addToolStickyButton(ToolbarButtonType.UNDO, DefaultToolbars.ButtonId.UNDO.value())
.addToolStickyButton(ToolbarButtonType.REDO, DefaultToolbars.ButtonId.REDO.value())
)

when i select Image tool & try to tap on document. Nothing is working.
Is there any help how to use this Image tool?

Thanks
Manoj

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

Would you mind clarifying if you are trying to create your own toolbar? If so, this behavior is expected as you will need to implement all the button clicks. This implementation can be seen in our source code of our fragment viewer.

Alternatively you could use our fragment component which has all of this implemented please see here for more information : PDFTron

Best Regards,
Eamon

Hi Emallon,

I want to create my own annotation toolbar like this

mAnnotationToolbarComponent.inflateWithBuilder(
AnnotationToolbarBuilder.withTag(“Custom Toolbar”)
.addToolButton(ToolbarButtonType.SQUARE, DefaultToolbars.ButtonId.SQUARE.value())
.addToolButton(ToolbarButtonType.INK, DefaultToolbars.ButtonId.INK.value())
.addToolButton(
ToolbarButtonType.FREE_HIGHLIGHT,
DefaultToolbars.ButtonId.FREE_HIGHLIGHT.value()
)
.addToolButton(ToolbarButtonType.IMAGE, DefaultToolbars.ButtonId.IMAGE.value())
.addToolStickyButton(ToolbarButtonType.UNDO, DefaultToolbars.ButtonId.UNDO.value())
.addToolStickyButton(ToolbarButtonType.REDO, DefaultToolbars.ButtonId.REDO.value())
)

Here I am using Image Annotation tool. When i click on Image tool & wanted to render selection pop-up to choose Image from camera/Gallery. I want something like attached copy. This behaviour works for iOS but not in Android. Please let me know if i missed something.

Thanks

Hi,

If you wish to use the image tool and toolbar this way you will need to add the image tool functionality. We added a sample project on how to add the image tool functionality, please see here for more information : https://github.com/PDFTron/pdftron-android-samples/commit/9ae8301e3e252bf2d68fd8b454f79bda78312397

Best Regards,
Eamon