1

I have used WebBrowser control in xaml like below.

<WebBrowser x:Name="pdfviewer"/> 

Also refer below for back end code

this.pdfviewer.Source = new Uri(@"C:\Users\VMH8COB\Desktop\UpdateRequestFormV2.pdf");

To hide the toobar I have used below code.

this.pdfviewer.Source = new Uri(@"C:\Users\VMH8COB\Desktop\UpdateRequestFormV2.pdf#toolbar=0");

It is working but if the escape key is pressed then adobe default side tool par will display. I want to disable print and save button else hide tool bar in all case.

I have searched for solution more than one week, but still I didn't get it.
Kindly help me on this.
Thanks.

Martin Backasch
  • 1,829
  • 3
  • 20
  • 30
vaitheesh
  • 23
  • 6
  • Are you creating the PDF document on your own? If so, you can try securing your PDF and disabling print and save options within your document. – Martin Backasch Oct 04 '17 at 10:56
  • @MartinBackasch No. I did not create the PDF files. PDF files are provided by Clients. Is possible to change in existing PDF files? – vaitheesh Oct 04 '17 at 13:58
  • It can be done. I must admit that I can't provide you the best way to do it, but I found the following answers on SO [itextpdf](https://stackoverflow.com/a/15173418/5893316) and [pdf sharp](https://stackoverflow.com/a/12383598/5893316). But this may not lead to your requested solution (see also [Disable SaveButton](https://stackoverflow.com/a/22882784/5893316)) – Martin Backasch Oct 05 '17 at 09:33

0 Answers0