PDF Viewer Component – Disable File Toolbar
Posted by office viewer on October 20th, 2007Function: boolean DisableFileToolbar (boolean bDisable);
Description: Disables the File toolbars. The method must be call after the PDF file opened.
Function: boolean DisableFileToolbar (boolean bDisable);
Description: Disables the File toolbars. The method must be call after the PDF file opened.
Function: boolean DisableViewRightClickMenu (boolean bDisable);
Description: Disables the right click menu at the view. The method must be call after the PDF file opened.
Function: boolean DisableToolbarRightClickMenu(boolean bDisable);
Description: Disables the right click menu at the toolbars. The method must be call after the PDF file opened.
Function: boolean DisableToolbar(boolean bDisable)
Description: Disables all the toolbars in the Adobe Reader. The method must be call after the PDF file opened.
Tips:
If you want to disable the toobars when you load a pdf file, you need put the method at OnDocumentOpened event.
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function PDFViewer1_NotifyCtrlReady()
{
document.PDFViewer1.LoadFile (“e:\\OA_Reference2.pdf”);
}
function PDFViewer1_OnDocumentOpened(FileName)
{
document.PDFViewer1.DisableToolbar (true);
}
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=PDFViewer1 EVENT=NotifyCtrlReady>
<!–
PDFViewer1_NotifyCtrlReady();
//–>
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=PDFViewer1 EVENT=OnDocumentOpened(FileName)>
<!–
PDFViewer1_OnDocumentOpened(FileName);
//–>
</SCRIPT>
Load PDF File
Function void LoadFile (BSTR strPath);
Description: Opens a PDF file located on a drive or remote web server.
PDFViewer1. LoadFile “http://www.ocxt.com/demo/samples/pdfviewerref.pdf”
Or PDViewer1.LoadFile ”c:\test.pdf”
You can use the component to return whether the Adobe Reader was Installed.
Function: boolean AdobeReaderIsInstalled ();
Description: Returns whether the client installs the PDF Reader.
Get Adobe Reader Version
Function: BSTR GetVersions ();
Description: Returns the version number of the Adobe PDF Reader.
Go to the First Page
Function: boolean GotoFirstPage ();
Description: Goes to first page of the PDF document.
Go to the Previous Page
Function: boolean GotoPreviousPage ();
Description: Goes to previous page of the PDF document.
Go to the Next Page
Function: boolean GotoNextPage();
Description: Goes to next page of the PDF document.
Go to the last Page
Function: boolean GotoLastPage();
Description: Goes to last page of the PDF document.
Function: boolean GotoPage(long n);
Description: Goes to the page n of the PDF document.
Function: boolean GoForwardStack ();
Description: Forwards to the next viewing step.
Recent Comments