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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disabling toolbar buttons in PdfViewerControl

Thread ID:

Created:

Updated:

Platform:

Replies:

107994 Mar 28,2013 08:23 AM UTC Jun 18,2018 04:58 PM UTC Windows Forms 12
loading
Tags: PdfViewer
Administrator [Syncfusion]
Asked On March 28, 2013 08:23 AM UTC

I am currently evaluating the PDFViewer control for WinForms, and have found it to be ideal for embedding into our application, because we want to present to the user a PDF document for review.  However, the DocumentToolbar also has a button (btnOpenFile) to load any arbitrary PDF file.  All buttons on the toolbar are okay for our application's review window; it's just the non-public btnOpenFile button that defeats the purpose of loading one specific PDF file.  Is there any way to hide this button?

Bruce Lum
Contact Innovations Inc.



SyncFusion.PdfViewerControl.DocumentToolbar_3a8f87ed.zip

Meikanda Nayanar [Syncfusion]
Replied On April 1, 2013 12:37 PM UTC

Hi Bruce,

Thank you for your update,

We can achieve the mentioned scenario with a custom tool bar instead of the tool bar attached with the PdfViewer control. We modified our custom tool bar sample and attached the sample in the below link.

Sample: Custom Toolbar.zip

Please try this sample and let us know if this suits your requirement.

Please let us know if you have any other concerns.

Regards,

Meikandan


Administrator [Syncfusion]
Replied On May 30, 2013 03:00 PM UTC

Hi Meikandan.

Thanks for your reply.

I was looking for a way to reuse the available toolbar and disable or hide just one button.  I like the 11 functions on the built-in toolbar; it's just the one "Open document" button that I don't want.

Any chance the toolbar properties (and those of the contained controls) can be publicly exposed for developers to customize, as opposed to having to redesign and recode everything?

Bruce Lum
Contact Innovations Inc.


Meikanda Nayanar [Syncfusion]
Replied On June 4, 2013 03:52 AM UTC

Hi Bruce ,

Thank you for your update.

At present we do not have support for “Hiding the ‘Open Document icon’ in the PdfViewer Control’s built in tool bar”. Could you please report this through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have any other questions.

Regards,
Meikandan


Dib Oglesby
Replied On August 14, 2013 06:32 PM UTC

Bruce,

I had the same problem.  Had to use a hack to fix it, but it works for now, until they expose it in a later version.  This code will hide the Open PDF button and the separator that follows it:

DirectCast(pdfControl.Controls(0).Controls(0).Controls(0), ToolStrip).Items(0).Visible = False
DirectCast(pdfControl.Controls(0).Controls(0).Controls(0), ToolStrip).Items(1).Visible = False

Meikanda Nayanar [Syncfusion]
Replied On August 19, 2013 04:41 AM UTC

Hi Dib,

Thank you for your update.
The feature "Hiding the ‘Open Document icon’ in the PdfViewer Control’s built in tool bar"  is still not implemented and we will let you know once the feature is implemented.

Please let us know if you have any other questions.

Regards,
Meikandan


Håkon Seljåsen
Replied On May 18, 2016 08:49 AM UTC

Hello,
I too need this feature. The posibility to hide the "Open Document" button in the toolbar but keep all the others. Do you have any plans of escalating this issue? Since it has been 3 years since it first was suggested.

In the meantime: Is there a way to work around this without recreating the entire toolbar? 

Håkon
Devinco AS

Deepak Gunasekaran [Syncfusion]
Replied On May 19, 2016 10:30 AM UTC

Hi Håkon, 
 
At present we do not have support to disable the open button from the inbuilt toolbar of PdfViewerControl. We have logged a feature request for the implementation of the same. 
 
We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity.  
 
However we have created a workaround to achieve the same using custom toolbar sample and it can be downloaded from the below link. 
 
Note: The workaround provided above will not have any changes in the inbuilt toolbar of PdfViewerControl. 
 
We will let you know once the feature is implemented. 
 
Regards, 
Deepak G 


Håkon Seljåsen
Replied On May 26, 2016 11:37 AM UTC

Hello, 
I have reviewed your sample and found that it cannot supply what we need at the moment.

We consider using your pdf viewer in stead of the one provided by DevExpress because you support more obsolete printer drivers than them, but as long as this would require us to implement the toolbar manualy, your control is not an option.
I suggest including a standalone toolbar for the pdf viewer where we are able to hide any specific button like the one provided by DevExpress (xtrapdfviewer.bars.pdfcommandbar).

I would expect that most programs will find the "Open" button irrelevant, except for dedicated PDF-engines.

Until this is fixed, your viewer will not be an option to us.




Håkon Seljåsen
Replied On May 26, 2016 11:48 AM UTC

Also: Exposing the ToolBar and its button through the PdfViewerControl would be a great solution!

Balasubramanian Sundararajan [Syncfusion]
Replied On May 31, 2016 03:51 AM UTC

Hi Håkon, 
 
Thank you for your update. 

A support incident to track the status for your last updated query has been created under your account. Please log on to our support website to check for further updates, 

Thanks, 
Balasubramanian S 


Rex
Replied On November 21, 2017 11:00 AM UTC

Thanks Dib Oglesby.. save my day...

Adolfo Emmanuel Juarez Marquez
Replied On June 18, 2018 04:58 PM UTC

Just try this:
pdfViewerControl1.ToolbarSettings.OpenButton.IsVisible = false;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;