Have you looked into the Java Native Interface (JNI)? It works both ways. You can use it in Java to call native libraries and you can also use it to call Java code from C/C++. This should give you access to the page count property as well as controlling output creation.

This link might help you get started:

http://java.sun.com/docs/books/tutorial/native1.1/implementing/index.html

Oosterbaan, Douglas S. (LNG-DAY) wrote:

Has anyone invoked FOP 0.20.5 from a C++ process?  We have a large
existing C++ component which needs the services provided by
FOP.   I've downloaded the binary and played around with it,
and was considering using a fork() and exec(), but FAQ 2.8 states:

"It is best to avoid exec'ing FOP, use the library interface
instead."

FAQ 2.8 is in reference to the Jave Runtime.exec() call, but I assume the same would apply to a C++ exec(). Also, I need
to get back the page count that is included in the results object returned by FOP.


My next approach is to download the source, write a Java
wrapper for FOP, and call my wrapper process either through
an exec() or a CORBA call. But if possible I would like to just use the binary in it's original form.


Has anyone else had any experience calling FOP from C++?
Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to