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();