Frameworks
React Native
Flutter
Package samples
Cookbook
Version 11
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
If you are newly adding the document viewer into your app, you can follow this guide to add the viewer with the new UI. If you are looking to migrate from the your viewer in your app to use the new UI, you can follow this ui migration guide.
For reference, you can checkout the new-ui
branch in our Android Samples GitHub repository for some integration sample projects.
To use the new drop-in viewer fragment, create a PdfViewCtrlTabHostFragment2
using the new ViewerBuilder2
class.
A new builder class DocumentActivity.IntentBuilder
has been added to help you more easily customize the activity document viewer. You can also use this new builder to specify the viewer to use the new UI as follows:
Buttons in the annotation toolbar can be customized using the AnnotationToolbarBuilder
API. The buttons on the annotation toolbar are contained in two groups: the scrollable region (left) and the sticky region (right). The scrollable region can contain any number of buttons and scrolling is used to access buttons that are off-screen. Buttons in the sticky region will always show on the screen and will not be scrollable.
For example, built-in PDF tool buttons can be added to a viewer as follows:
Afterwards, you can supply this AnnotationToolbarBuilder
to the viewer using the ViewerConfig class
.
If you would like to add a button with custom functionality, you can add a generic button as so:
Then you can listen for annotation toolbar button events by adding a PdfViewCtrlTabHostFragment2.TabHostListener
:
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales