Hello, Are you sure the method renderXmlXsl() returns the rendered document ?, from the output you get, it sounds like it is not returning anything, y'd better document your self on the java class to see if there is another method to use to get the output pdf file back from it.
Regards, __________________________________ Hassan El Forkani http://WarmAfrica.com EveryOne's Africa __________________________________ At 11:09 29/04/02, Bedilu Habte wrote: >Hi everyone, > >I use the apache FOP tool to transform & render an XML-XSL pair to a PDF. >The following code shows my trial to perform the transformation and >rendering >within a php-script. > ><?php > 1. $trtool = new Java("de.smc.util.PDFTransformer"); > 2. $result = $trtool->renderXmlXsl('data.xml', 'style.xsl'); > 3. if (!$result) { > 4. die("Cannot process PDF-tarnsformation!"); > 5. } > 6. Header("Content-type: application/pdf\nContent-Length: " . >strlen($result)); > 7. print $result; > 8. $fo = "result.pdf"; > 9. $fp = fopen($fo, "w+"); >10. fwrite($fp, $result); >11. fclose($fp); >?> > >It appears that the transformation and rendering is performed without errors >( according to >the System-output). However, in the context I used, $result contains the 6 >characters >'Object' which was supposed to contain the pdf document. >NB.: 1. de.smc.util.PDFTransformer is a custom class that uses FOP. > 2. renderXmlXsl(xml,xsl) returns a java.io.ByteArrayInputStream. > >Any idea on how to extract the content out of a Java-Object in php? > >hoping... > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php __________________________________ hassan el forkani http://WarmAfrica.com EveryOne's Africa __________________________________ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php