XML_FO2PDF
| From: | LIMBOURG Arnaud | Date: | Fri, 13 Dec 2002 15:34:57 +0000 |
| Subject: | XML_FO2PDF | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-11613@lists.php.net to get a copy of this message | ||
Hello,
I started playing around with the FO2PDF class.
Running it as such did not give any result, it kept saying
Warning: java.lang.NoSuchMethodException: setparserfeatures in
c:\xxx\pear\XML\fo2pdf.php on line 180
FOP ERROR: setparserfeatures in c:\xxx\pear\XML\fo2pdf.php:190
Reading the code comments I saw the following
* according to the documentation, the following lines should be
enough,
* to do, what we want. but it didn't work. Yes, it did, but it
produced
* approx. 10 pdf-files for each run...
*
* $options = new
Java("org.apache.fop.apps.CommandLineOptions",$options);
* $starter = $options->getStarter();
* $starter->run();
*
* Therefore i took the code from
org/apache/fop/apps/CommandLineStarter.java
* converted it to php-code and it works now... if anyone has a
better solution
* please inform me ;)
Just for the hell of it I used this code and it works great, it did not
generate 10 files, just one. I guess they fixed things in later FOP
versions.
I'm using J2RE 1.4.1 and FOP 0.20.4 under NT4. (i saw that a first RC of
0.20.5 is just out, the release will occur in the next weeks).
My question is, would that be ok if i replace the incriminated code with
this, since it appears to work (did not test it on linux though) ??
BTW, anybody using this class out there ?
Arnaud