tags:

views:

246

answers:

4

Hi, Has anyone experience or had problems implementing a JNI wrapper for apache FOP?

Bonus points: Any other options for processing xsl-fo from C++?

A: 

well, the obious way is to

#include <cstdio>
#include <string>

int runFop(const char* params) {

     // put the real path here
     const char* FOP_CMD = "fop.bat";

     std::string cmd(FOP_CMD);
     cmd += " ";
     cmd += params;

     return system(cmd.c_str());
}
akira
Nice, but hardly answer my plroblem
eLAN
why not? do you want the fop created in-memory-only?
akira
A: 

I would be interested in this answer as well, because I was looking for the same thing a couple years ago, and eventually just used the Java FOP which was not ideal for our case since we were using it from a C++ application.

A: 

I do that for C# not for C. I generate proxies to wrap fop classes, so it looks like original fop example, but it's not Java. The tool I use is jni4net I created.

For you Jace would be good choice I think.

Pavel Savara
A: 

We initially used fop as our rendering engine but found it had some size limitiations. We ended up purchasing a third-party product from Ecrion - XF Rendering Service. Yeah I know, its not open source, its not free, but it is a very good product that we have used for several years now with very good results.

ScottTx