Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

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

sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi,

Can anyone please tell if we can embed PDF-XChangeViewer SDK ActiveX control in SharePoint webPage/Asp.net page(any web application). If so, how can we achieve that. Please explain.

Thanks in advance.

Regards,
Sukhman
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by Corwin - Tracker Sup »

I can recomend you to read this article:
How to host ActiveX controls in a Web form
HTH
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi Corwin,


I tried to do so. But since this is developed as windows forms control dll, not a webform control. It is not possible to embed the same as server side control on ASP.Net page.

Thanks and Regards,
Sukhman
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by Corwin - Tracker Sup »

Well ActiveX controls is indeed not the same as Web controls. Client side should have installed and registered PDF-XChange Viewer ActiveX control to see it on Web page. But that doesn’t mean that you cannot add ActiveX controls to your ASP.Net page.
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi,

I created a web application and tried to embed the activex control by using the following html tags:
<object id="PXCV" classid="CLSID:FE36F0F3-F082-41B7-9EED-772505A7C054" width="600" height="500"></object>

Also copied the ActiveX control dll in the root folder of web application. I had written a code to load the control with pdf on Page_Load. But the control doesn't load pdf file.There is no error though.
Please help.

Thanks and Regards,
Sukhman
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by Corwin - Tracker Sup »

Here is small sample of how to add Viewer ActiveX on Web page – maybe it can help you.
You do not have the required permissions to view the files attached to this post.
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Actually I too was trying the similar way....

But now changed a code exactly as per the sample provided by you. But now I get the error "PXCV(i.e the activex control object) is not defined". Can you guide what could be the cause?
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by Corwin - Tracker Sup »

Can you give us sample project on which you get such error?
Also just to make it clear - so do you get PDFXChange Viewer on the sample which I have provided?
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi,

PFA the web-application I have created. Yes I can see the document loaded in the sample provided by you.

Thanks.
You do not have the required permissions to view the files attached to this post.
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi,

The only difference i see in the sample and my web app is that...the sample contains plain html file whereas mine is ".aspx"(ASP.net) page.

Thanks in advance.

Regards,
Sukhman
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by Corwin - Tracker Sup »

Hello Sukhman.
In ASP.NET by using JS to access to ActiveX component you should get it from "document.all" first. So here is your fixed code:

Code: Select all

<script language="javascript" type="text/javascript">
	function OpenFile()
	{
		document.all.PXCV.OpenDocument("",0,0,0)
	}
 </script>
HTH.
sukhman
User
Posts: 23
Joined: Fri Jul 03, 2009 6:19 am

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by sukhman »

Hi Corwin,

Thanks a lot for the help. It really saved lot of our time.

Your prompt response really saved us from wasting time on small things and now we can go ahead and implement other features as required.

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

Re: Can we embed PDF-Xchange SDK ActiveXControl in SharePoint

Post by John - Tracker Supp »

Good news Sukhman :)
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