Error 82130001

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Error 82130001

Post by Rad1 »

Hi everybody

I use PDF-XChange Viewer SDK with the follow Java Script, I can open document in IE, but nothing else.

Code: Select all

<html>
<head>
<title>PDF-XChange Viewer ActiveX test...</title>
<script>

    function btnOpen()
    {
	PDFView.SetProperty("Commands[33132].State","Online")
    }
			
</script>
</head>
<body>

<input type="button" id="btnOpen" value="Open document" onclick = "btnOpen()">

</br>

<object id="PDFView" classid="CLSID:FE36F0F3-F082-41B7-9EED-772505A7C054" width="100%" height="90%">
</object>

</body>
</html>

Impossible to do this operation, Error code : 82130001

thanks for help.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Error 82130001

Post by Corwin - Tracker Sup »

You receive "Invalid argument" error. When you want to call some command by its ID you should add "#" prefix to ID string. Something like this:

Code: Select all

PDFView.SetProperty("Commands[#33132].State","Online")
This command will enable StickyNote tool. Actually this tool is enabled by default, so there is no need to run this command.
To open PDF document you can use next function

Code: Select all

function btnOpen()
{
	PDFView.OpenDocument("place path to PDF document here or leave it void", 0, 0, 0)
}
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: Error 82130001

Post by Rad1 »

Thanks a lot friend. it works.

I have an other question about the same thing : how can I display -or not- the Menu, Tabs, MDI or SDI....etc.

Can I use SetProperty ?

please give me some example code.

10x friend.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Error 82130001

Post by Corwin - Tracker Sup »

To show menu you can use next property:

Code: Select all

PDFView.SetProperty("View.Bars[\"Menu\"].Visible", 1, 0); // show menu bar
PDFView.SetProperty("View.Bars[\"Menu\"].Visible", 0, 0); // hide menu bar
All needed information about how to work with UI you can find in Help file in "Reference->Named Items->Named Objects->View" topic.
To switch between MDI and SDI you can use "General.DocumentInterface" property.
Also, have you seen sample projects which come with Viewer ActiveX SDK?