public static class

ViewerConfig.Builder

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.config.ViewerConfig.Builder

Class Overview

Builder class used to create an instance of ViewerConfig.

Summary

Public Constructors
Builder()
Public Methods
ViewerConfig.Builder addToolbarBuilder(AnnotationToolbarBuilder builderToAdd)
Adds the toolbar builder to list of toolbars that will be created in the viewer using PdfViewCtrlTabHostFragment2.
ViewerConfig.Builder alwaysShowAsReply(boolean alwaysShowAsReply)
Sets whether an annotation reply always instead of annotation comment in collaboration viewer only

Defaults to false

ViewerConfig.Builder annotationPositionSnappingEnabled(boolean annotationPositionSnappingEnabled)
Sets whether an annotation's position will snap to the page center or other annotations of the same group when the user moves the annotation in the viewer.
ViewerConfig.Builder annotationToolbarPosition(PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition annotationToolbarPosition)
Sets where to show the annotation toolbar.
ViewerConfig.Builder annotationsListEditingEnabled(boolean annotationsListEditingEnabled)
Sets whether the AnnotationDialogFragment can modify the document Default to true.
ViewerConfig.Builder annotationsListFilterEnabled(boolean annotationListFilterEnabled)
Sets whether the filter in AnnotationDialogFragment is enabled.
ViewerConfig.Builder autoHideToolbarEnabled(boolean shouldAutoHide)
This method is deprecated. The viewer will no longer auto hide from v7.1.1. This flag is ignored. Sets whether the options toolbar should automatically hide when the user is interacting with the document viewer. By default, the toolbar will automatically hide.
ViewerConfig.Builder autoSortUserBookmarks(boolean autoSortUserBookmarks)
Sets whether to automatically sort the User Bookmarks when they are added.
ViewerConfig.Builder bottomBarBuilder(BottomBarBuilder builderToSet)
Set the toolbar builder that will be used to inflate the bottom bar
ViewerConfig build()
ViewerConfig.Builder conversionCachePath(String convertedPath)
Sets the folder path for converted files
ViewerConfig.Builder conversionOptions(String conversionOptions)
Sets ConversionOptions for non-pdf conversion
ViewerConfig.Builder documentEditingEnabled(boolean documentEditingEnabled)
Whether to enable document editing.
ViewerConfig.Builder excludeAnnotationListTypes(int[] excludedAnnotationListTypes)
Sets the list of excluded annotation types that will not be displayed in the AnnotationDialogFragment
ViewerConfig.Builder fullscreenModeEnabled(boolean fullscreenModeEnabled)
Whether to enable full screen mode.
ViewerConfig.Builder hidePresetBar(boolean hidePresetBar)
Whether to hide preset bar.
ViewerConfig.Builder hidePresetBars(ToolbarButtonType[] toolbarButtonTypes)
Hides the preset bars for the selected tool types.
ViewerConfig.Builder hideSaveCopyOptions(int[] modes)
Sets which save copy options to hide in the save copy menu If showSaveCopyOption(boolean) is true, this value is ignored Some menu options may be ignored if useStandardLibrary(boolean) is true
ViewerConfig.Builder hideThumbnailEditOptions(ThumbnailsViewEditOptions[] options)
Sets which edit options to hide in ThumbnailsViewFragment
ViewerConfig.Builder hideThumbnailFilterModes(FilterModes[] modes)
Sets which filter modes to hide in ThumbnailsViewFragment
ViewerConfig.Builder hideToolbars(String[] toolbarsToHide)
Set which toolbars to hide in the toolbar switcher dialog.
ViewerConfig.Builder hideViewModeItems(ViewModePickerItems[] ids)
Set which items to hide in ViewModePickerDialogFragment
ViewerConfig.Builder imageInReflowEnabled(boolean imageInReflowEnabled)
Whether to show images in reflow mode.
ViewerConfig.Builder initialToolbarTag(String toolbarTag)
Sets the initial toolbar to show when the viewer is shown.
ViewerConfig.Builder layoutInDisplayCutoutMode(int cutoutMode)
Sets the display cutout mode.
ViewerConfig.Builder longPressQuickMenuEnabled(boolean longPressQuickMenuEnabled)
Whether to enable long press quick menu.
ViewerConfig.Builder maximumTabCount(int count)
Sets the maximum number of tabs allowed.
ViewerConfig.Builder movableToolbarEnabled(boolean movableToolbarEnabled)
Sets whether dragging toolbar to different locations are allowed

Defaults to false

ViewerConfig.Builder multiTabEnabled(boolean multiTab)
Whether to enable multi-tab mode.
ViewerConfig.Builder navigationListAsSheetOnLargeDevice(boolean navigationListAsSheetOnLargeDevice)
Whether navigation list is opened as side sheet on large tablet or dialog.
ViewerConfig.Builder openSavedCopyInNewTab(boolean openSavedCopyInNewTab)
Sets whether the new saved file should open after saving Default to true.
ViewerConfig.Builder openUrlCachePath(String openUrlCachePath)
Sets the cache folder path for open URL files
ViewerConfig.Builder openUrlPasswordCheckEnabled(boolean openUrlPasswordCheckEnabled)
Sets whether to allow user to enter password for open URL files Default to false.
ViewerConfig.Builder outlineListEditingEnabled(boolean outlineListEditingEnabled)
Sets whether the OutlineDialogFragment can modify the document Default to true.
ViewerConfig.Builder pageNumberIndicatorPosition(int pageNumberIndicatorPosition)
Sets the position of page number indicator.
ViewerConfig.Builder pageStackEnabled(boolean pageStackEnabled)
Whether to show page stack navigation buttons.
ViewerConfig.Builder pdfViewCtrlConfig(PDFViewCtrlConfig config)
ViewerConfig.Builder permanentPageNumberIndicator(boolean permanentPageNumberIndicator)
Whether to show page number indicator always.
ViewerConfig.Builder permanentToolbars(boolean permanentToolbars)
Whether to permanently show top and bottom toolbars.
ViewerConfig.Builder permanentTopToolbar(boolean permanentTopToolbar)
This method is deprecated. use permanentToolbars(boolean) instead. Whether to permanently show top toolbar. Default to false. When true, the toolbar will be shown above the viewer instead of an overlay. If ViewerConfig#showTopToolbar returns false, then this value is ignored.
ViewerConfig.Builder presetExpanding(boolean presetExpanding)
Sets whether the preset bar on tablet expands when a tool is selected.
ViewerConfig.Builder quickBookmarkCreation(boolean quickBookmarkCreation)
Sets whether the bookmark button is visible in the viewer to create bookmarks with a single tap.
ViewerConfig.Builder reflowOrientation(int orientation)
Sets the scrolling direction of the reflow control.
ViewerConfig.Builder rememberLastUsedTool(boolean rememberLastToolbar)
Whether to select the last used tool when the viewer is launched, for PdfViewCtrlTabHostFragment2
ViewerConfig.Builder rememberLastUsedToolbar(boolean rememberLastToolbar)
Whether to show the last used toolbar when the viewer is shown, for PdfViewCtrlTabHostFragment2
ViewerConfig.Builder restrictDownloadUsage(boolean restrictDownloadUsage)
Sets whether to restrict data used when viewing an online PDF
ViewerConfig.Builder rightToLeftModeEnabled(boolean rightToLeftModeEnabled)
Whether to view documents from right to left.
ViewerConfig.Builder saveCopyExportPath(String exportPath)
Sets the folder path for all save a copy options
ViewerConfig.Builder saveToolbarItemOrder(boolean saveToolbarItemOrder)
Sets whether the toolbars should save the ordering of the tools.
ViewerConfig.Builder setInitialToolbarTag(String toolbarTag)
This method is deprecated. see initialToolbarTag(String)
ViewerConfig.Builder setToolManagerBuilder(ToolManagerBuilder toolManagerBuilder)
This method is deprecated. replaced by toolManagerBuilder(ToolManagerBuilder) instead Sets tool manager builder for building tool manager
ViewerConfig.Builder showAnnotationReplyReviewState(boolean showAnnotationReplyReviewState)
Whether to show annotation reply review state in collaboration viewer.
ViewerConfig.Builder showAnnotationToolbarOption(boolean showAnnotationToolbarOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showAnnotationsList(boolean showAnnotationsList)
If ViewerConfig#showBookmarksView returns false, then this value is ignored.
ViewerConfig.Builder showAppBar(boolean showAppBar)
Whether to show top toolbar and annotation toolbar.
ViewerConfig.Builder showBookmarksView(boolean showBookmarksView)
If ViewerConfig#showBottomNavBar returns false, then this value is ignored.
ViewerConfig.Builder showBottomNavBar(boolean showBottomNavBar)
This method is deprecated. Whether to show bottom navigation bar. Default to true. For legacy UI only.
ViewerConfig.Builder showBottomToolbar(boolean showBottomToolbar)
Whether to show bottom toolbar.
ViewerConfig.Builder showCloseTabOption(boolean showCloseTabOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showConversionDialog(boolean showConversionDialog)
Whether the viewer should show the conversion progress dialog.
ViewerConfig.Builder showCropOption(boolean showCropOption)
This method is deprecated. use hideViewModeItems(ViewModePickerDialogFragment.ViewModePickerItems[]) instead.

Set showCropOption to true to show the cropping option in ViewModePickerDialogFragment

ViewerConfig.Builder showDigitalSignaturesOption(boolean showDigitalSignaturesOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showDocumentSettingsOption(boolean showDocumentSettingsOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showDocumentSlider(boolean showDocumentSlider)
Whether to show document slider.
ViewerConfig.Builder showDownloadDialog(boolean showDownloadDialog)
Whether the viewer should show the download progress dialog.
ViewerConfig.Builder showEditMenuOption(boolean showEditMenuOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showEditPagesOption(boolean showEditPagesOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showEmptyPreset(boolean showEmptyPreset)
Sets whether the empty state of the preset bar will show on tablets.
ViewerConfig.Builder showFileAttachmentOption(boolean showFileAttachmentOption)
Whether the viewer will show file attachment menu if the document contains attachments.
ViewerConfig.Builder showFillAndSignToolbarOption(boolean showFillAndSignToolbarOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showFormToolbarOption(boolean showFormToolbarOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showOpenFileOption(boolean showOpenFileOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showOpenUrlOption(boolean showOpenUrlOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showOutlineList(boolean showOutlineList)
If ViewerConfig#showBookmarksView returns false, then this value is ignored.
ViewerConfig.Builder showPageNumberIndicator(boolean showPageNumberIndicator)
Whether to show page number indicator overlay.
ViewerConfig.Builder showPrintOption(boolean showPrintOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showQuickNavigationButton(boolean showQuickNavigationButton)
Whether to show quick page navigation forward and backward buttons.
ViewerConfig.Builder showReflowOption(boolean showReflowOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showRightToLeftOption(boolean showRightToLeftOption)
Whether to enable RTL option in the view mode dialog.
ViewerConfig.Builder showSaveCopyOption(boolean showSaveCopyOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showSearchView(boolean showSearchView)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showShareOption(boolean showShareOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder showThumbnailView(boolean showThumbnailView)
If ViewerConfig#showBottomNavBar returns false, then this value is ignored.
ViewerConfig.Builder showToolbarSwitcher(boolean showToolbarSwitcher)
Whether to show the toolbar switcher if using PdfViewCtrlTabHostFragment2
ViewerConfig.Builder showTopToolbar(boolean showTopToolbar)
Whether to show top toolbar.
ViewerConfig.Builder showUserBookmarksList(boolean showUserBookmarksList)
If ViewerConfig#showBookmarksView returns false, then this value is ignored.
ViewerConfig.Builder showViewLayersToolbarOption(boolean showViewLayersOption)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder skipReadOnlyCheck(boolean skipReadOnlyCheck)
Whether the viewer should skip read only checks on a document.
ViewerConfig.Builder tabletLayoutEnabled(boolean tabletLayoutEnabled)
Sets whether the tablet layout should be enabled on tablet devices
ViewerConfig.Builder thumbnailViewEditingEnabled(boolean thumbnailViewEditingEnabled)
Sets whether the ThumbnailsViewFragment can modify the document Default to true If documentEditingEnabled(boolean) is false, this value is ignored
ViewerConfig.Builder toolManagerBuilder(ToolManagerBuilder toolManagerBuilder)
Sets tool manager builder for building tool manager
ViewerConfig.Builder toolManagerBuilderStyleRes(int styleRes)
Sets the style resource ID used for ToolManagerBuilder
ViewerConfig.Builder toolbarItemGravity(int layoutGravity)
Sets the toolbar item layout gravity
ViewerConfig.Builder toolbarTitle(String toolbarTitle)
If Activity or Fragment supply its own Toolbar, then this value is ignored.
ViewerConfig.Builder topToolbarMenuIds(TopToolbarMenuId[] toolbarButtonTypes)
Defines custom top toolbar menu items.
ViewerConfig.Builder useCompactViewer(boolean useCompactViewer)
Sets whether to use 2-line toolbar or 1-line toolbar
ViewerConfig.Builder useStandardLibrary(boolean useStandard)
Sets whether the PDFTron library used is Standard version or Full version.
ViewerConfig.Builder useSupportActionBar(boolean useSupportActionBar)
Sets whether to use SupportActionBar for inflating ToolBar menu
ViewerConfig.Builder userBookmarkCreationEnabled(boolean userBookmarkCreationEnabled)
Sets whether bookmark creation is enabled in UserBookmarkDialogFragment.
ViewerConfig.Builder userBookmarksListEditingEnabled(boolean userBookmarksListEditingEnabled)
Sets whether the UserBookmarkDialogFragment can modify the document Default to true If documentEditingEnabled(boolean) is false, this value is ignored
ViewerConfig.Builder userBookmarksListEditingMode(int userBookmarksListEditingMode)
Sets which editing options are allowed in the UserBookmarkDialogFragment Default to show all options.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public ViewerConfig.Builder addToolbarBuilder (AnnotationToolbarBuilder builderToAdd)

Adds the toolbar builder to list of toolbars that will be created in the viewer using PdfViewCtrlTabHostFragment2.

Parameters
builderToAdd the builder containing toolbar information that will be created in the viewer

public ViewerConfig.Builder alwaysShowAsReply (boolean alwaysShowAsReply)

Sets whether an annotation reply always instead of annotation comment in collaboration viewer only

Defaults to false

public ViewerConfig.Builder annotationPositionSnappingEnabled (boolean annotationPositionSnappingEnabled)

Sets whether an annotation's position will snap to the page center or other annotations of the same group when the user moves the annotation in the viewer.

Default to true.

public ViewerConfig.Builder annotationToolbarPosition (PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition annotationToolbarPosition)

Sets where to show the annotation toolbar.

Default to Top

public ViewerConfig.Builder annotationsListEditingEnabled (boolean annotationsListEditingEnabled)

Sets whether the AnnotationDialogFragment can modify the document Default to true. If documentEditingEnabled(boolean) is false, this value is ignored

public ViewerConfig.Builder annotationsListFilterEnabled (boolean annotationListFilterEnabled)

Sets whether the filter in AnnotationDialogFragment is enabled.

public ViewerConfig.Builder autoHideToolbarEnabled (boolean shouldAutoHide)

This method is deprecated.
The viewer will no longer auto hide from v7.1.1. This flag is ignored. Sets whether the options toolbar should automatically hide when the user is interacting with the document viewer. By default, the toolbar will automatically hide.

public ViewerConfig.Builder autoSortUserBookmarks (boolean autoSortUserBookmarks)

Sets whether to automatically sort the User Bookmarks when they are added. User will not be able to sort the list manually in the UI. Otherwise, user will be able to sort the list manually in the UI but User Bookmarks are appended to the end when they are added.

Parameters
autoSortUserBookmarks true if auto sorting of user bookmarks is enabled. Default to true.

public ViewerConfig.Builder bottomBarBuilder (BottomBarBuilder builderToSet)

Set the toolbar builder that will be used to inflate the bottom bar

Parameters
builderToSet the builder containing toolbar information that will be used to inflate the bottom bar

public ViewerConfig build ()

public ViewerConfig.Builder conversionCachePath (String convertedPath)

Sets the folder path for converted files

public ViewerConfig.Builder conversionOptions (String conversionOptions)

Sets ConversionOptions for non-pdf conversion

public ViewerConfig.Builder documentEditingEnabled (boolean documentEditingEnabled)

Whether to enable document editing. When disabled, all menu options that will edit the document will be gone.

public ViewerConfig.Builder excludeAnnotationListTypes (int[] excludedAnnotationListTypes)

Sets the list of excluded annotation types that will not be displayed in the AnnotationDialogFragment

public ViewerConfig.Builder fullscreenModeEnabled (boolean fullscreenModeEnabled)

Whether to enable full screen mode.

public ViewerConfig.Builder hidePresetBar (boolean hidePresetBar)

Whether to hide preset bar. Default to false.

public ViewerConfig.Builder hidePresetBars (ToolbarButtonType[] toolbarButtonTypes)

Hides the preset bars for the selected tool types.

public ViewerConfig.Builder hideSaveCopyOptions (int[] modes)

Sets which save copy options to hide in the save copy menu If showSaveCopyOption(boolean) is true, this value is ignored Some menu options may be ignored if useStandardLibrary(boolean) is true

Parameters
modes the menu options to hide

public ViewerConfig.Builder hideThumbnailEditOptions (ThumbnailsViewEditOptions[] options)

Sets which edit options to hide in ThumbnailsViewFragment

Parameters
options the edit options to hide

public ViewerConfig.Builder hideThumbnailFilterModes (FilterModes[] modes)

Sets which filter modes to hide in ThumbnailsViewFragment

Parameters
modes the filter modes to hide

public ViewerConfig.Builder hideToolbars (String[] toolbarsToHide)

Set which toolbars to hide in the toolbar switcher dialog. Must have at least 1 toolbar showing.

Parameters
toolbarsToHide array referencing toolbar tags for toolbars that should be hidden in the toolbar switcher

public ViewerConfig.Builder hideViewModeItems (ViewModePickerItems[] ids)

Set which items to hide in ViewModePickerDialogFragment

public ViewerConfig.Builder imageInReflowEnabled (boolean imageInReflowEnabled)

Whether to show images in reflow mode. Default true.

public ViewerConfig.Builder initialToolbarTag (String toolbarTag)

Sets the initial toolbar to show when the viewer is shown. If rememberLastUsedToolbar(boolean) is set to true, the initial toolbar will be overridden by the last used toolbar. For PdfViewCtrlTabHostFragment2

Parameters
toolbarTag related to the toolbar that we want to show

public ViewerConfig.Builder layoutInDisplayCutoutMode (int cutoutMode)

Sets the display cutout mode. Only available when in full screen mode.

public ViewerConfig.Builder longPressQuickMenuEnabled (boolean longPressQuickMenuEnabled)

Whether to enable long press quick menu.

public ViewerConfig.Builder maximumTabCount (int count)

Sets the maximum number of tabs allowed. By default, the maximum count is 3 on phone and 5 on tablet. Adding subsequent tabs will remove other tabs to respect the limit.

public ViewerConfig.Builder movableToolbarEnabled (boolean movableToolbarEnabled)

Sets whether dragging toolbar to different locations are allowed

Defaults to false

public ViewerConfig.Builder multiTabEnabled (boolean multiTab)

Whether to enable multi-tab mode.

public ViewerConfig.Builder navigationListAsSheetOnLargeDevice (boolean navigationListAsSheetOnLargeDevice)

Whether navigation list is opened as side sheet on large tablet or dialog.

public ViewerConfig.Builder openSavedCopyInNewTab (boolean openSavedCopyInNewTab)

Sets whether the new saved file should open after saving Default to true.

public ViewerConfig.Builder openUrlCachePath (String openUrlCachePath)

Sets the cache folder path for open URL files

public ViewerConfig.Builder openUrlPasswordCheckEnabled (boolean openUrlPasswordCheckEnabled)

Sets whether to allow user to enter password for open URL files Default to false.

public ViewerConfig.Builder outlineListEditingEnabled (boolean outlineListEditingEnabled)

Sets whether the OutlineDialogFragment can modify the document Default to true. If documentEditingEnabled(boolean) is false, this value is ignored

public ViewerConfig.Builder pageNumberIndicatorPosition (int pageNumberIndicatorPosition)

Sets the position of page number indicator. Default to POSITION_BOTTOM_START.

public ViewerConfig.Builder pageStackEnabled (boolean pageStackEnabled)

Whether to show page stack navigation buttons.

public ViewerConfig.Builder pdfViewCtrlConfig (PDFViewCtrlConfig config)

public ViewerConfig.Builder permanentPageNumberIndicator (boolean permanentPageNumberIndicator)

Whether to show page number indicator always. Default to false. This value is ignored if showPageNumberIndicator returns false.

public ViewerConfig.Builder permanentToolbars (boolean permanentToolbars)

Whether to permanently show top and bottom toolbars. Default to false. When true, the viewer will be shown in between the toolbars. Single tap will not hide the toolbars. Both top and bottom applies for new UI, however only top applies for old UI. If ViewerConfig#showTopToolbar returns false, then this value is ignored.

public ViewerConfig.Builder permanentTopToolbar (boolean permanentTopToolbar)

This method is deprecated.
use permanentToolbars(boolean) instead. Whether to permanently show top toolbar. Default to false. When true, the toolbar will be shown above the viewer instead of an overlay. If ViewerConfig#showTopToolbar returns false, then this value is ignored.

public ViewerConfig.Builder presetExpanding (boolean presetExpanding)

Sets whether the preset bar on tablet expands when a tool is selected.

Defaults to false

public ViewerConfig.Builder quickBookmarkCreation (boolean quickBookmarkCreation)

Sets whether the bookmark button is visible in the viewer to create bookmarks with a single tap. Default to false.

public ViewerConfig.Builder reflowOrientation (int orientation)

Sets the scrolling direction of the reflow control. Value has to be one of HORIZONTAL or VERTICAL, default to horizontal.

public ViewerConfig.Builder rememberLastUsedTool (boolean rememberLastToolbar)

Whether to select the last used tool when the viewer is launched, for PdfViewCtrlTabHostFragment2

public ViewerConfig.Builder rememberLastUsedToolbar (boolean rememberLastToolbar)

Whether to show the last used toolbar when the viewer is shown, for PdfViewCtrlTabHostFragment2

public ViewerConfig.Builder restrictDownloadUsage (boolean restrictDownloadUsage)

Sets whether to restrict data used when viewing an online PDF

public ViewerConfig.Builder rightToLeftModeEnabled (boolean rightToLeftModeEnabled)

Whether to view documents from right to left. If ViewerConfig#showRightToLeftOption return false, then this value is ignored.

public ViewerConfig.Builder saveCopyExportPath (String exportPath)

Sets the folder path for all save a copy options

public ViewerConfig.Builder saveToolbarItemOrder (boolean saveToolbarItemOrder)

Sets whether the toolbars should save the ordering of the tools.

public ViewerConfig.Builder setInitialToolbarTag (String toolbarTag)

This method is deprecated.
see initialToolbarTag(String)

Sets the initial toolbar to show when the viewer is shown. If rememberLastUsedToolbar(boolean) is set to true, the initial toolbar will be overridden by the last used toolbar. For PdfViewCtrlTabHostFragment2

Parameters
toolbarTag related to the toolbar that we want to show

public ViewerConfig.Builder setToolManagerBuilder (ToolManagerBuilder toolManagerBuilder)

This method is deprecated.
replaced by toolManagerBuilder(ToolManagerBuilder) instead Sets tool manager builder for building tool manager

public ViewerConfig.Builder showAnnotationReplyReviewState (boolean showAnnotationReplyReviewState)

Whether to show annotation reply review state in collaboration viewer. Default to true.

public ViewerConfig.Builder showAnnotationToolbarOption (boolean showAnnotationToolbarOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show annotation toolbar view icon.

public ViewerConfig.Builder showAnnotationsList (boolean showAnnotationsList)

If ViewerConfig#showBookmarksView returns false, then this value is ignored. Whether to show annotation list.

public ViewerConfig.Builder showAppBar (boolean showAppBar)

Whether to show top toolbar and annotation toolbar. Default to true.

public ViewerConfig.Builder showBookmarksView (boolean showBookmarksView)

If ViewerConfig#showBottomNavBar returns false, then this value is ignored. If all of ViewerConfig#showAnnotationsList, ViewerConfig#showOutlineList, and ViewerConfig#showUserBookmarksList return false, then this value is ignored. Whether to show bookmarks view icon.

public ViewerConfig.Builder showBottomNavBar (boolean showBottomNavBar)

This method is deprecated.
Whether to show bottom navigation bar. Default to true. For legacy UI only.

public ViewerConfig.Builder showBottomToolbar (boolean showBottomToolbar)

Whether to show bottom toolbar. Default to true. For new UI only.

public ViewerConfig.Builder showCloseTabOption (boolean showCloseTabOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show close document option in the overflow menu.

public ViewerConfig.Builder showConversionDialog (boolean showConversionDialog)

Whether the viewer should show the conversion progress dialog. Default true.

public ViewerConfig.Builder showCropOption (boolean showCropOption)

This method is deprecated.
use hideViewModeItems(ViewModePickerDialogFragment.ViewModePickerItems[]) instead.

Set showCropOption to true to show the cropping option in ViewModePickerDialogFragment

public ViewerConfig.Builder showDigitalSignaturesOption (boolean showDigitalSignaturesOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show digital signatures toolbar menu option.

public ViewerConfig.Builder showDocumentSettingsOption (boolean showDocumentSettingsOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show bookmarks view icon.

public ViewerConfig.Builder showDocumentSlider (boolean showDocumentSlider)

Whether to show document slider. Default to true.

public ViewerConfig.Builder showDownloadDialog (boolean showDownloadDialog)

Whether the viewer should show the download progress dialog. Default true.

public ViewerConfig.Builder showEditMenuOption (boolean showEditMenuOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show edit menu menu option.

public ViewerConfig.Builder showEditPagesOption (boolean showEditPagesOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show edit pages option.

public ViewerConfig.Builder showEmptyPreset (boolean showEmptyPreset)

Sets whether the empty state of the preset bar will show on tablets.

Default to True

public ViewerConfig.Builder showFileAttachmentOption (boolean showFileAttachmentOption)

Whether the viewer will show file attachment menu if the document contains attachments. Default true.

public ViewerConfig.Builder showFillAndSignToolbarOption (boolean showFillAndSignToolbarOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show fill and sign toolbar menu option.

public ViewerConfig.Builder showFormToolbarOption (boolean showFormToolbarOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show prepare form toolbar menu option.

public ViewerConfig.Builder showOpenFileOption (boolean showOpenFileOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show open file option.

public ViewerConfig.Builder showOpenUrlOption (boolean showOpenUrlOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show open url option.

public ViewerConfig.Builder showOutlineList (boolean showOutlineList)

If ViewerConfig#showBookmarksView returns false, then this value is ignored. Whether to show outline list.

public ViewerConfig.Builder showPageNumberIndicator (boolean showPageNumberIndicator)

Whether to show page number indicator overlay. Default to true.

public ViewerConfig.Builder showPrintOption (boolean showPrintOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show print option.

public ViewerConfig.Builder showQuickNavigationButton (boolean showQuickNavigationButton)

Whether to show quick page navigation forward and backward buttons. Default true.

public ViewerConfig.Builder showReflowOption (boolean showReflowOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show reflow menu option.

If useStandardLibrary(boolean) is set to true, then this value is ignored.

public ViewerConfig.Builder showRightToLeftOption (boolean showRightToLeftOption)

Whether to enable RTL option in the view mode dialog. If useStandardLibrary(boolean) is set to true, then this value is ignored.

public ViewerConfig.Builder showSaveCopyOption (boolean showSaveCopyOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show save a copy option.

public ViewerConfig.Builder showSearchView (boolean showSearchView)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show search view icon.

public ViewerConfig.Builder showShareOption (boolean showShareOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show share icon.

public ViewerConfig.Builder showThumbnailView (boolean showThumbnailView)

If ViewerConfig#showBottomNavBar returns false, then this value is ignored. Whether to show thumbnail view icon.

public ViewerConfig.Builder showToolbarSwitcher (boolean showToolbarSwitcher)

Whether to show the toolbar switcher if using PdfViewCtrlTabHostFragment2

public ViewerConfig.Builder showTopToolbar (boolean showTopToolbar)

Whether to show top toolbar. Default to true. If ViewerConfig#showAppBar returns false, then this value is ignored.

public ViewerConfig.Builder showUserBookmarksList (boolean showUserBookmarksList)

If ViewerConfig#showBookmarksView returns false, then this value is ignored. Whether to show user bookmarks list.

public ViewerConfig.Builder showViewLayersToolbarOption (boolean showViewLayersOption)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Whether to show the view layers toolbar menu option.

public ViewerConfig.Builder skipReadOnlyCheck (boolean skipReadOnlyCheck)

Whether the viewer should skip read only checks on a document. Default false.

public ViewerConfig.Builder tabletLayoutEnabled (boolean tabletLayoutEnabled)

Sets whether the tablet layout should be enabled on tablet devices

public ViewerConfig.Builder thumbnailViewEditingEnabled (boolean thumbnailViewEditingEnabled)

Sets whether the ThumbnailsViewFragment can modify the document Default to true If documentEditingEnabled(boolean) is false, this value is ignored

public ViewerConfig.Builder toolManagerBuilder (ToolManagerBuilder toolManagerBuilder)

Sets tool manager builder for building tool manager

public ViewerConfig.Builder toolManagerBuilderStyleRes (int styleRes)

Sets the style resource ID used for ToolManagerBuilder

public ViewerConfig.Builder toolbarItemGravity (int layoutGravity)

Sets the toolbar item layout gravity

public ViewerConfig.Builder toolbarTitle (String toolbarTitle)

If Activity or Fragment supply its own Toolbar, then this value is ignored. Toolbar title.

public ViewerConfig.Builder topToolbarMenuIds (TopToolbarMenuId[] toolbarButtonTypes)

Defines custom top toolbar menu items.

public ViewerConfig.Builder useCompactViewer (boolean useCompactViewer)

Sets whether to use 2-line toolbar or 1-line toolbar

Parameters
useCompactViewer true if use 1-line toolbar, false otherwise. Default to false.

public ViewerConfig.Builder useStandardLibrary (boolean useStandard)

Sets whether the PDFTron library used is Standard version or Full version. When Standard version is used, all features that are not available in Standard version will be hidden and will not be able to enable. Default to false.

public ViewerConfig.Builder useSupportActionBar (boolean useSupportActionBar)

Sets whether to use SupportActionBar for inflating ToolBar menu

public ViewerConfig.Builder userBookmarkCreationEnabled (boolean userBookmarkCreationEnabled)

Sets whether bookmark creation is enabled in UserBookmarkDialogFragment. Default to true. If userBookmarksListEditingEnabled(boolean) is false, this value is ignored.

public ViewerConfig.Builder userBookmarksListEditingEnabled (boolean userBookmarksListEditingEnabled)

Sets whether the UserBookmarkDialogFragment can modify the document Default to true If documentEditingEnabled(boolean) is false, this value is ignored

public ViewerConfig.Builder userBookmarksListEditingMode (int userBookmarksListEditingMode)

Sets which editing options are allowed in the UserBookmarkDialogFragment Default to show all options. Valid inputs are CONTEXT_MENU_DELETE_ITEM_BIT | CONTEXT_MENU_DELETE_ALL_BIT | CONTEXT_MENU_EDIT_ITEM_BIT For example, the following will disable rename only: userBookmarksListEditingMode( UserBookmarkDialogFragment.CONTEXT_MENU_DELETE_ITEM_BIT | UserBookmarkDialogFragment.CONTEXT_MENU_DELETE_ALL_BIT)