Frameworks
React Native
Flutter
Package samples
Cookbook
Version 11
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
The document viewer can be customized by overriding the PDFTronAppTheme
xml style in your project. For example:
Note that the theme name must either exactly match PDFTronAppTheme
or passed into ViewerBuilder2.usingTheme(int)
and extend PDFTronAppTheme
theme. If you cannot extend PDFTronAppTheme
and is extending an AppCompat
theme, then you will need to define custom theme attributes for the theme to work properly. Here are the custom attributes:
Attribute | Description |
---|---|
| Used to style the options menu toolbar. See |
| Used to style the popup menu in the toolbar. See |
| Used to style the options menu toolbar background. See |
| Used to style the quick menu. See |
| Used to style the outline/user bookmark/annotation list dialog. See |
| Used to style the stamp dialog tab layout. See |
| Used to style the bottom navigation bar. See |
| Used to style the annotation preset bar. See |
| Used to style the annotation toolbar. See |
| Used to style the toolbar switcher popup dialog. See |
| Used to style the toolbar switcher menu button. See |
| Used to style the tab action button. See |
| Used to style the page slider. See |
| Used to style the document tabs. See |
| Used to style the floating action buttons. See |
| Used to style the sound annotation dialog. See |
| Used to style the page indicator. See |
| Used to style the sticky note dialog. See |
| Used to style the signature creation dialog. See |
| Used to style the toolbar editor dialog. See |
| Used to style the annotation style dialog. See |
| Used to style the annotation filter dialog. See |
| Used to style the stamp creation dialog. See |
| Used to style the add page dialog. See |
| Used to style the tab switcher dialog. See |
| Used to style the outline dialog. See |
Additionally if you are not using a NoActionBar
theme AppCompat theme, you will need to add the additional attributes:
Note, we highly recommend extend PDFTronAppTheme
whenever possible.
Similarly, each component in the viewer can be customized separately depending on your design requirements. To do so, the styles of each component must be referenced in PDFTronAppTheme
. For example:
For a full list of component styles available, please take a look at the default styles for PDFTronAppTheme in styles.xml
of the Tools package.
A sample that uses styles to customize the document viewer can be found on our [GitHub repository](https://github.com/ApryseSDK/pdftron-android-samples/tree/master/CustomUI).
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales