Access PDFTron menu share and print function

Product: Android Native SDK

Product Version: 9.2.3

Please give a brief summary of your issue:
Access PDFTron default menu share and print functionality from custom menu

Please describe your issue and provide steps to reproduce it:
I’m using a custom menu:

val fragment = ViewerBuilder2.withUri(Uri.parse(link))
                        if (isTask)

When I open up my custom menu it looks like this:

I am trying to hook up my “share” and “print” button with the PDFTron Fragment’s share and print code. If I cannot, how can I grab the File that the Fragment downloaded so I can call custom code on my end to export it?

Thanks :slight_smile:

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:


Hi there,

If you implement your own custom overflow menu and you want to use our logic for share/print you can add the same id for each action we use.

Please see the id for share and print below:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android=""
        app:showAsAction="never" />
        app:showAsAction="never" />

You can view all our ids in the source code in the download package : PDFTron Systems Inc. | Download-center

Please let us know if this solution works for you.


1 Like

This works. Thank you!

1 Like