ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Disable Save Print Right Click options from PDF Viewer in ASP.Net<p>Hi <a class="username" rel="paulrajmca">paulrajmca</a>,</p> <p>iFrame is used to display the pdf in browser. Save, Print, Rightclick are the inbuilt functionality of PDF viewer. You can't disable those. These are handled by the browser itself and different for each browser.</p> <p>What you can do is you can hide the toolbar by setting the below properties.</p> <p><strong>toolbar = 0 : </strong>Hides the Toolbar</p> <p><strong>navpanes = 0&nbsp;</strong>: Hides the Navbar</p> <p><strong>scrollbar = 0</strong>&nbsp;: Hides the Scrollbar</p> <p>Like in the below example.</p> <pre class="brush: html">&lt;iframe frameborder=&#34;1&#34; src=&#34;Test.pdf#toolbar=0&amp;navpanes=0&#34; width=&#34;1000&#34; height=&#34;750&#34;&gt; &lt;/iframe&gt;</pre> <p>For a full list of parameters refer the below link.</p> <p><a href="http://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf">http://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf</a></p>https://www.aspforums.net:443/Threads/534953/Disable-Save-Print-Right-Click-options-from-PDF-Viewer-in-ASPNet/https://www.aspforums.net:443/Threads/534953/Disable-Save-Print-Right-Click-options-from-PDF-Viewer-in-ASPNet/Thu, 08 Mar 2018 00:35:48 GMTDisable Save Print Right Click options from PDF Viewer in ASP.Net<p>Hi <a class="username" rel="paulrajmca">paulrajmca</a>,</p> <p>You have not assigned the correct src property. After the pdf file name with extension you need to add <strong># </strong>with parameter and then you can add additional parameter with <strong>&amp;</strong>.</p> <p>Check the below example.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <pre class="brush: html">&lt;iframe runat=&#34;server&#34; id=&#34;pdfiframe&#34; frameborder=&#34;1&#34; src=&#34;&#34; width=&#34;300&#34; height=&#34;300&#34;&gt; &lt;/iframe&gt;</pre> <p><strong><span style="text-decoration: underline;">C#</span></strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { string pdfUrl = &#34;http://tutelagelabs.com/student/Learning/EX-CH12-U10-C02-Q-018 Ans.pdf&#34;; pdfiframe.Attributes[&#34;src&#34;] = pdfUrl + &#34;#embedded=true&amp;toolbar=0&amp;navpanes=0&#34;; }</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><img src="https://i.imgur.com/Pe9iIMK.jpg" alt="" width="372" height="367" /></p>https://www.aspforums.net:443/Threads/534953/Disable-Save-Print-Right-Click-options-from-PDF-Viewer-in-ASPNet/https://www.aspforums.net:443/Threads/534953/Disable-Save-Print-Right-Click-options-from-PDF-Viewer-in-ASPNet/Thu, 08 Mar 2018 02:12:55 GMT