Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Integrating Acrobat 7 with Java Ole - ActiveX

807607Oct 26 2006 — edited Oct 26 2006
Has anyone successfully integrated Acrobat 7 in any way with java?

I know for a fact there are some examples at IBM (only works for version 5 & 6) : http://www-128.ibm.com/developerworks/library/os-activex/

Then there are some ActiveX example for word:
http://www.eclipse.org/articles/Article-ActiveX%20Support%20in%20SWT/ActiveX%20Support%20in%20SWT.html

But none of these examples seem to work for Acrobat 7.

I have updated the IBM example with the new Adobe progId ie
site = new OleControlSite( frame, SWT.NONE, "AcroExch.Document" );
This new progId instantiates a file chooser dialog, and then the OleFrame is correctly populated with the pdf document.

The problem is then trying to get the Document from the ActiveX component.

I have printed the functions for component AcroExch.Document, I have attached them to the end of this message.

After reading the "Acrobat Interapplication Communication Overview", and seeing the diagram on page 21, it seems that I need to get the AVDoc.

So the function Document, with the description "Gets the associated AV Document object", seems like my logical choice.

So I do this:
int[] appId = this.auto.getIDsOfNames( new String[] { "Document" } );
and I get the (id = 497) as a return result.

But then if do :
Variant pVarResult1 = this.auto.invoke( appId[ 0 ] );
or if I try with site.exec I always get a null result.

Can anyone point me in the right direction?

I just want to be able to imbed the reader, without its widgets, and to do things programmatically like zoom.

As an optional plus, I would like to be able to use a stream instead of a file, but I am pretty sure this is not supported.

Any help would be much appreciated.

Thanks

##########################
 
Functions for AcroExch.Document.

METHOD (id = 1610612736) : 
	Signature   : void QueryInterface([in] UserDefined * riid, [out] unknown 16410 ppvObj)
	Description : null
	Help File   : null

METHOD (id = 1610612737) : 
	Signature   : unsigned int AddRef()
	Description : null
	Help File   : null

METHOD (id = 1610612738) : 
	Signature   : unsigned int Release()
	Description : null
	Help File   : null

METHOD (id = 1610678272) : 
	Signature   : void GetTypeInfoCount([out] unknown 16407 pctinfo)
	Description : null
	Help File   : null

METHOD (id = 1610678273) : 
	Signature   : void GetTypeInfo([in] unknown 23 itinfo, [in] unsigned int lcid, [out] unknown 16410 pptinfo)
	Description : null
	Help File   : null

METHOD (id = 1610678274) : 
	Signature   : void GetIDsOfNames([in] UserDefined * riid, [in] unknown 16410 rgszNames, [in] unknown 23 cNames, [in] unsigned int lcid, [out] int * rgdispid)
	Description : null
	Help File   : null

METHOD (id = 1610678275) : 
	Signature   : void Invoke([in] int dispidMember, [in] UserDefined * riid, [in] unsigned int lcid, [in] unknown 18 wFlags, [in] UserDefined * pdispparams, [out] Variant * pvarResult, [out] UserDefined * pexcepinfo, [out] unknown 16407 puArgErr)
	Description : null
	Help File   : null

METHOD (id = 498) : 
	Signature   : IDispatch Application()
	Description : Gets the Acrobat Application object
	Help File   : null

METHOD (id = 497) : 
	Signature   : IDispatch Document()
	Description : Gets the associated AV Document object
	Help File   : null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2006
Added on Oct 26 2006
2 comments
218 views