Theme-Logo
  •   .Net
    •   C Sharp(C#)
    •   Web API
    •   Micro Services
    •   ASP.Net
    • ASP.Net MVC
    • .Net Core
  •   Database
    • SQL Server
    • Oracle
    • PostgreSQL
  •   jQuery
    • jQuery Tutorials
    • jQuery Plugins
    • jQuery UI
    • More on jquery
  •   Tutorials
    • Microservices Tutorials
    • DotNet Core Tutorials
    • PostgreSql Tutorials
Hiding tool bar in AXAcroPdf using C# in window application

To hide pdf nav bar and tool bar it need to Kill axAcroLib process (Process name: AcroRd32) and then load file each time.


                         KillAcroPDF(); // this method will kill axrAcroPDF each time
                        Adb.LoadFile("D:/FileLoc/yourpdf.pdf");
                        Adb.setShowToolbar(false);
                        Adb.setView("FitH");
                        Adb.Show();
                         

Now lets see KillAcroPDF() method (using C#):

                                private void  KillAcroPDF() 
                                {
                                    if (Adb != null)
                                    {
                                        foreach (Process proc in Process.GetProcessesByName("AcroRd32"))
                                        {
                                            proc.Kill();
                                        }
                                    }
                                }
                        

It can also achieve same things by using scr property of AxAcroPDF something like :

Step 1. Save below command and run this text file (create registory in system).

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Applications\Acrobat.exe\shell\Open\command]

@="\"C:\\Program Files (x86)\\Adobe\\Acrobat 10.0\\Acrobat\\Acrobat.exe\" /A \"navpanes=0\" \"%1\""

Step 2. Then use src property:

                        Adb.src= "D:/FileLoc/yourpdf.pdf";
                        Adb.setShowToolbar(false);
                        Adb.setView("FitH");
                        Adb.Show();
Trending Post
What are the effects methods used in jQuery?.
What are the categories in jquery Events?
What is the difference between the ID selector and class selector in jQuery?
What is the difference between onload() and document.ready() methods?
What is the advantage of hosting a jQuery using a CDN?
What is the difference between bind() vs live() vs delegate() methods in jQuery?
Explain the difference between jquery.size() and jquery.length?
Explain the difference between $(this) and this in jQuery?
Interview Questions and Answers
What are JQuery selectors?
What are the different types of Selectors?
What is jQuery.noConflict?
About us

DotNet Palace is a community platform created and maintained by The articles are mainly focused on Microsoft stack technologies like C#, ASP.Net, MVC, .Net Core, SQL Server and Oracle, PostgreSQL, SQLite etc. To improve the site's content you can send your valuable suggestions at info.dotnetpalace@gmail.com

Quick links
  • SOLID Principles
  • Questions
  • OOPS Principles
  • DotNet Palace Tutorials
  • Privacy Policy
  • Terms and Condition