Previous | Next | (P-PDF) Developers
Topic: Re: GetJSObject() from C++
Conf: (P-PDF) Developers, Msg: 105908
From: kirkoman
Date: 2/13/2004 04:57 AM
Thanks for the response, Leonard
Wouldn't it be a LOT easier to just write a plugin and call it from there???
Boy, that's the truth. AFExecuteThisScript() in particular looks positively juicy. But I am adding functionality to an existing application. Acrobat rendering of PDFs to Postscript is just one (optional) piece of the pipeline. We could write a plugin just for the new functionality, but then we are managing two products, docs, support, installer smarts, blah blah blah. It is a possibility, but only if the OLE interface cannot be made to work.
> This works up to the point of opening the file, but there is no SaveAs()
> function in the API. The tantalizing GetJSObject() returns a live
> IDispatch object, but it will not give me its ITypeInfo, so I cannot call
> any of its methods.
Correct.
Do you mean "correct" there is no SaveAs(), or "correct" the JSObject will not give out its ITypeInfo? If the latter, are you saying this is by design?
Did Adobe put this method in its C headers just to be consistent? They could easily have hidden it by leaving it out of the interface (CAcroPDDoc is just a dispatch driver, after all).
> I know the point of this object is for the VB bridge, but there *must*
> be a way to use it from C++ (right?).
In theory there is, but AFAIK, no one has ever tried...
Sweet, I am on the cutting edge! If I succeed, I will let you know.