ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mode?

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

cPdfViewerUser
User
Posts: 11
Joined: Sat Nov 08, 2014 2:56 pm

ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mode?

Post by cPdfViewerUser »

Hi
I have written an activex control to open pdf documents using PDFXCview.exe and PDFXCviewAx.dll.
This works fine.
I would like to be able to display pdf documents in mshtml.
This is a MFC application using the browser control / mshtml / trident active x control.
I notice you provide PDFXCviewIEPlugin.dll which mshtml is able to detect and
load as per the global file type association in the registry.

Is is possible to have trident use a pre-written active x control to load a pdf document
directly using PDFXCview.exe/PDFXCviewAx.dll or is the plugin required?

Also, I noticed the requirement with PDFXCviewIEPlugin to disable
Protected Mode with internet explorer.
If I have custom activex control do I still have to disable Protected Mode?

Thanks for the information.
Regards
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by Stefan - PDF-XChange »

Hello cPdfViewerUser,

Apologies for the delay in answering your question - I had to consult with a colleague from the dev team first.
He has advised me that actually there is no need to disable "Protected Mode".
To show your own ActiveX in a browser (or browser control) you should write a special ActiveX and associate it with a MIME type as explained here:
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

Regards,
Stefan
cPdfViewerUser
User
Posts: 11
Joined: Sat Nov 08, 2014 2:56 pm

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by cPdfViewerUser »

Hi Stefan

That is an excellent answer, exactly what I was looking for.

Thank you for all the help.

Regards
cPdfViewerUser
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by Stefan - PDF-XChange »

:)
cPdfViewerUser
User
Posts: 11
Joined: Sat Nov 08, 2014 2:56 pm

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by cPdfViewerUser »

Hi Stefan

Just one more follow-up question.

Since the PDF X change viewer is already an active x control.
can it be associated directly with pdf type? using the MIME registry keys you mentioned.

Or should I create another activex control as a wrapper to pdfxchange viewer.


Thanks again for the help.
cPdfViewerUser
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by Stefan - PDF-XChange »

Hello cPdfViewerUser,

The "browser plug-ins" we offer ourselves are exactly such wrappers, so you will need to write your own as well.

Regards,
Stefan
cPdfViewerUser
User
Posts: 11
Joined: Sat Nov 08, 2014 2:56 pm

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by cPdfViewerUser »

Hi Stefan

The Internet Explorer extension PDFXCviewIEPlugin.dll is not included in the SDK.
What are the licensing terms with this dll?

We have a licensed copy of the SDK but can we supply this dll with our product?

We would also like to be able to register it during our install process?
I know you supply an installer but can we do this manually ourselves?


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

Re: ActiveX vs PDFXCviewIEPlugin in Mshtml with Protected Mo

Post by Vasyl - PDF-XChange »

Hi, cPdfViewerUser.
The Internet Explorer extension PDFXCviewIEPlugin.dll is not included in the SDK.
Because it is not component of this SDK. It is only for end-users. But if you want - you may use it as well, it is free. On the target machine - this component automatically uses the installed end-user's license key (if key exists) for PRO-features using. So you cannot set your developer's license key to it, even you have this key. It might cause problem for you..
It provides very small number of features for developers:
ICoPDFXCviewIEPlugin::Src - property, you may pass FileName/URL here to open.
IOleCommandTarget::Exec() - control handles only OLECMDID_SAVEAS, OLECMDID_PRINT, OLECMDID_PROPERTIES
IPersistFile::Load(...)
IPersistFile::Save(...)
IPersistFile::GetCurFile(...)
IPersistMoniker::Load(...)
We would also like to be able to register it during our install process?
I know you supply an installer but can we do this manually ourselves?
Yes, you may include it into your installer. During installation call:

regsvr32 PDFXCviewIEPlugin.dll /s

- but it registers component only as typical ActiveX Control. To activate it as PDF-viewer inside IE write in registry:

HKCR\Mime\DataBase\Content Type\application/pdf
CLSID = "{C5D07EB6-BBCE-4DAE-ACBB-D13A8D28CB1F}"
Extension = ".pdf"

HTH
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.