OnEvent problem under ie9

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

mr_steph
User
Posts: 52
Joined: Tue Jul 22, 2008 8:18 am

OnEvent problem under ie9

Post by mr_steph »

Hi,

We have the following script to handle event in javascript.
Since IE9, we don't intercept any event fired by the viewer.

Code: Select all

		<script language="javascript" for="PDFView" event="OnEvent(Type, Name, DataIn, DataOut, Flags)">
			ChangementDocumentActif(Type, Name, DataIn, DataOut, Flags);
		</script>
Thanks for help.

Stéphane
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19876
Joined: Mon Jan 12, 2009 8:07 am

Re: OnEvent problem under ie9

Post by Stefan - PDF-XChange »

Hello Stéphane,

We are now discussing this case in the team, and will post back here as soon as we have any additional information or advise for you.

Best,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: OnEvent problem under ie9

Post by Vasyl - PDF-XChange »

Hi, Stéphane.

The our IE-Plugin is not SDK-component - it is EndUser-component only, so it does not fire any events to IE.
Instead you may implement your own IE-Plugin which will use our full PDF-Viewer ActiveX Control SDK...
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
mr_steph
User
Posts: 52
Joined: Tue Jul 22, 2008 8:18 am

Re: OnEvent problem under ie9

Post by mr_steph »

Hi,

We use PDF-Viewer ActiveX Control SDK since 3 years.
All is OK in IE8.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: OnEvent problem under ie9

Post by Vasyl - PDF-XChange »

Hi, Stéphane.

As I understand you have a html page with embedded our ActiveX control (or IE-Plugin?).

Can you provide us with the relevant html source snippet for the control where you are embedding code and handling events - so that we may better understand the issue you have and can reproduce please ?

Please ensure all license info is removed prior to posting here.

Thanks.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
mr_steph
User
Posts: 52
Joined: Tue Jul 22, 2008 8:18 am

Re: OnEvent problem under ie9

Post by mr_steph »

Hi,

Part of the html source for the embedded control

Code: Select all

<head>
<script type="text/javascript" for="PDFView" event="OnEvent(Type, Name, DataIn, DataOut, Flags)">
	ChangementDocumentActif(Type, Name, DataIn, DataOut, Flags);
</script>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="width:100%;height:100%;" bgcolor="ButtonFace" onload="LoadOcxVisio()">
	<div id='ToolBar' style='width:100%;height:22px;'></div>
	<div id='OcxVisio' style='width:100%;' onresize="CalculTailleVisio();">
	<script>CalculTailleVisio();</script>
		<object id='PDFView'  style="width:100%;height:100%;"></object>
		<iframe id='View' style="width:100%;height:100%;"></iframe>
	</div>
</body>
Part of source code for handling events of the control (which is in a separate js file)

Code: Select all

/**
* @brief ChangementDocumentActif
*
* @param Type
* @param Name
* @param DataIn
* @param DataOut
* @param Flags
*/
function ChangementDocumentActif(Type, Name, DataIn, DataOut, Flags)
{
	var DocID = PDFView.Property("Documents.Active", 0)
    if ((Type == 1) && (DocID!=-1 || (DocID==-1 && PDFView.Property("Documents.Count", 0)==0))){
		switch(Name){
			case "Documents.Active" :
				if(top.IFMain && top.IFMain.IsFromNum){
					break;
				}
				if(CheminTop==""){
					if(top.IFMain){
						top.IFMain.RefreshVisioToolbar(DocID);
					}
				}
				else{
					CheminTop.RefreshVisioToolbar(DocID);
				}
			 	break;
			case "Documents[#" + DocID + "].OriginalFileName" :
				if(signedFile[DocID]!=null){
					signedFile[DocID].src=PDFView.Property("Documents[#"+DocID+"].FileName",0);
					outilSignature(0);
				}
				break;
			case "Operations.SignDocument.CertHash":
			case "Operations.SignDocument.CertFileName":
				if(signedFile[DocID]==null){
					signedFile[DocID]={dest:PDFView.Property("Documents[#"+DocID+"].FileName",0)};
				}
			 	break;
		}
	}
	else if(Type==3 && Name=="Prompts.ConfirmDocumentSave" && typeof(onDoBeforeUnload)!="undefined" && onDoBeforeUnload==1){
		PDFView.SetProperty("Prompts.ConfirmDocumentSave.UserChoice","No");
	}
}
Thanks for your help.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19876
Joined: Mon Jan 12, 2009 8:07 am

Re: OnEvent problem under ie9

Post by Stefan - PDF-XChange »

Thanks for the samples mr_steph,

We are working with a holiday schedule between Christmas and New Year - so I will now pass this to Vasyl for a further investigation, but getting a reply could take a bit longer!

Merry Christmas and Happy New Year!
Stefan
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: OnEvent problem under ie9

Post by Ivan - Tracker Software »

Sorry, maybe I misunderstood something, but I guess you have to specify CLASSID attribute for OBJECT tag in your sample html.
Can you let me know the CLASSID you are using?
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
mr_steph
User
Posts: 52
Joined: Tue Jul 22, 2008 8:18 am

Re: OnEvent problem under ie9

Post by mr_steph »

Hi,

the CLASSID is :

Code: Select all

<object id='PDFView' classid='CLSID:FE36F0F3-F082-41B7-9EED-772505A7C054' style="width:100%;height:100%;"></object>
Thanks
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: OnEvent problem under ie9

Post by Vasyl - PDF-XChange »

Hi Stéphane.

I have tested your problem (exhaustively) but still couldn't reproduce it. The embedded ActiveX fires events as it should...
I have attached the archive with my test-html and screenshot...

Best
Regards.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
miromr
User
Posts: 59
Joined: Sat May 09, 2009 3:05 pm

Re: OnEvent problem under ie9

Post by miromr »

Vasyl-Tracker Dev Team wrote:Hi, Stéphane.

The our IE-Plugin is not SDK-component - it is EndUser-component only, so it does not fire any events to IE.
Instead you may implement your own IE-Plugin which will use our full PDF-Viewer ActiveX Control SDK...
Hi Vasyl
Is possible send sample or link for create your own IE-Plugin?

Thank you Miro
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: OnEvent problem under ie9

Post by John - Tracker Supp »

Hi,

I am afraid we do not offer support for 3rd party products like IE - you will need to take a look at MSDN etc - there is copious detail on writing such plug-ins out there on MSDN and the various NG's and forums etc ...
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: OnEvent problem under ie9

Post by Vasyl - PDF-XChange »

Hi, miromr

Some start points:

1. you may implement your COM-server (inproc, DLL) which contain special ActiveX Control (http://msdn.microsoft.com/en-us/library ... 85%29.aspx):
Your control must implement next interfaces:
IOleObject
IOleInPlaceObject
IOleControl
IObjectWithSite
...

2. Your control embedds our PDFViewer ActiveX Control in standard way.

3. To handle the pdf by your control inside IE write to the registry:
HKCR\Mime\DataBase\Content Type\application/pdf
Extension = ".pdf"
CLSID = "<ClassIdOfYourActiveXControl>"
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
miromr
User
Posts: 59
Joined: Sat May 09, 2009 3:05 pm

Re: OnEvent problem under ie9

Post by miromr »

Many thanks Vasyl
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7361
Joined: Wed Mar 25, 2009 10:37 pm

Re: OnEvent problem under ie9

Post by Paul - PDF-XChange »

:D
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com