We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

toolbar

how can i hide printbutton or download button in pdfviewer or disable it or prevent it using server-side code i need example please ??

Attachment: 312019_80612_PM_298e2397.rar

1 Reply

SS Sathish Sivakumar Syncfusion Team March 4, 2019 10:01 AM UTC

Hi Mohamed, 
We can show or hide the toolbar icons of the PDF viewer control using the toolbarItem property of the toolbarSettings object. Refer to the following API documentation link for further details about the toolbarItem property.  
Use the following code snippet to show MagnificationTools, PageNavigationTools and SelectionTool in PDF Viewer toolbar, 
   protected void Page_Load(object sender, EventArgs e) 
        { 
            PdfViewer1.ToolbarSettings = new Syncfusion.JavaScript.Models.PDFViewer.PdfViewerToolbarSettings(); 
            PdfViewer1.ToolbarSettings.Items = Syncfusion.JavaScript.PdfViewerEnums.ToolbarItems.MagnificationTools | Syncfusion.JavaScript.PdfViewerEnums.ToolbarItems.PageNavigationTools | Syncfusion.JavaScript.PdfViewerEnums.ToolbarItems.SelectionTool; 
        }   
 
We have created the sample for the same and shared in the following link, 
You can also show or hide the group of icons in the PDF viewer control toolbar using the following methods:  
Tools 
Methods 
Download  
Page Navigation  
Text Markup Annotation  
Signature  
Text Search 
Print 
Selection  
Magnification  
 
Please find the UG documentation for the toolbar customization, 

Regards, 
Sathish 


Loader.
Live Chat Icon For mobile
Up arrow icon