1
Hiding tools in Document viewer
Question asked by Narayan Prasad Twayana - 1/30/2018 at 2:04 AM
Answered
I am currently using document viewer to preview my documents. But I don't want all the controls of the preview. I need to hide some controls like fullScreenButton. But I could not hide the controls. Someone, please suggest me the way to hide the controls.
Narayan

1 Reply

Reply to Thread
0
Cem Alacayir Replied
Employee Post Marked As Answer
FYI, this is now available in DocumentUltimate v3.11.0:
 
DeniedPermissions="GoFullScreen" (aspx)

documentViewer.DeniedPermissions = DocumentViewerPermissions.GoFullScreen;
 
 
  • Added: AllowedPermissions and DeniedPermissions properties to DocumentViewer. Now all actions on the toolbar and the tabs on the left pane can be turned on or off by DocumentViewerPermissions (JS is no more is needed to hide buttons).

    Available permissions:

    Download
    DownloadAsPdf
    Print
    SelectText
    NavigatePages
    NavigateHistory
    Zoom
    Pan
    ChangeFitMode
    ChangeLayoutMode
    Rotate
    Find
    GoFullScreen
    ViewThumbnails
    ViewBookmarks
    Search

    API changes:

    - DownloadEnabled="False" -> DeniedPermissions="Download"
                                 documentViewer.DeniedPermissions = DocumentViewerPermissions.Download
    - DownloadAsPdfEnabled="False" -> DeniedPermissions="DownloadAsPdf"
                                      documentViewer.DeniedPermissions = DocumentViewerPermissions.DownloadAsPdf
    - PrintEnabled="False" -> DeniedPermissions = "Print"
                              documentViewer.DeniedPermissions = DocumentViewerPermissions.Print
    - TextSelectionEnabled="False" -> DeniedPermissions = "SelectText"
                                      documentViewer.DeniedPermissions = DocumentViewerPermissions.SelectText

Reply to Thread