PDF-Viewer as Eclipse Plugin

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

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

PDF-Viewer as Eclipse Plugin

Post by martin2 »

Hi,

we would be very interested in embedding the viewer in an Eclipse application. Eclipse generally supports the embedding of Active-X controls. But when we try to open the control we get an error: Failed to create Ole Client. result = -2147467262 (aka: "No such interface supported").

Has anybody tried to do this, has any idea on how to change things or are there any plans from Tracker to support Eclipse embedding (which would be a unique selling point compared to Adobe which have the same problem).

Here is the code I used to check the embedding in Eclipse 3.2.1

import org.eclipse.swt.SWT;
import org.eclipse.swt.ole.win32.OLE;
import org.eclipse.swt.ole.win32.OleControlSite;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Test {

public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
frame.setSize(800, 600);
shell.setVisible(true);

OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "PDFXCviewAx.CoPDFXCview.1");
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
controlSite.doVerb(OLE.OLEIVERB_UIACTIVATE);
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}

Unfortunately I posted this topic on the wrong forum before - therefore now again in the developer forum.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: PDF-Viewer as Eclipse Plugin

Post by Ivan - Tracker Software »

did you register the AX properly?

To do this you need to:
1) run PDFXCview.exe /RegServer
2) run regsvr32 PDFXCviewAx.dll

or use the developers installer for distribution purposes to end users :

see the last messages in this post for the link and use options for this:

https://forum.pdf-xchange.com/ ... =36&t=4055
Tracker Software (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.
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: PDF-Viewer as Eclipse Plugin

Post by martin2 »

Hi,

yes I did. And I controlled the registry entries. I can also run at least the C example (I have no .NET installed on my test machine to check the other ones). So the control should be installed correctly.

Martin
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: PDF-Viewer as Eclipse Plugin

Post by Ivan - Tracker Software »

Ok, will try to install Eclipse here and will check where the problem is.
Thanks for your patience.
Tracker Software (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.
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: PDF-Viewer as Eclipse Plugin

Post by martin2 »

There is an interesting post on an Eclipse forum that handles similar problems and a way the user changed his control to work with Eclipse. Maybe this article can help:
http://beta.eclipsezone.com/forums/thre ... &#92148123
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: PDF-Viewer as Eclipse Plugin

Post by Ivan - Tracker Software »

There are no description what was changed into control.
We are using C++ and ATL, so, I don't think we need to change anything.
Tracker Software (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.
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: PDF-Viewer as Eclipse Plugin

Post by martin2 »

The main point in this article was that the Microsoft specification requires that the control implements a certain set of interfaces. All of the interfaces that are not implemented by the control itself should be delegated to some kind of default handler. Might this also be the case for your control?
Are you investigating the problem any further - or did you stop (as your last post suggests)?
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom

Re: PDF-Viewer as Eclipse Plugin

Post by John - Tracker Supp »

Hi,

We will take another look and try and find a resolution in build 38 released later this week.
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
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: PDF-Viewer as Eclipse Plugin

Post by Ivan - Tracker Software »

Fixed in build 38.
IPersistStorage was the interface required by Java.
Tracker Software (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.
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: PDF-Viewer as Eclipse Plugin

Post by martin2 »

Great - can you tell me when the new PDF-Xchange Viewer SDK will be available in build 38? The download link just delivers build 37.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: PDF-Viewer as Eclipse Plugin

Post by Ivan - Tracker Software »

It will be available tomorrow or after tomorrow, if all goes well.
Tracker Software (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.
martin2
User
Posts: 29
Joined: Thu May 29, 2008 9:06 am

Re: PDF-Viewer as Eclipse Plugin

Post by martin2 »

GREAT! It works really fine now. Thanks!!!
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom

Re: PDF-Viewer as Eclipse Plugin

Post by John - Tracker Supp »

Pleasure :)
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