xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul.beza...@sgcib.com
Subject Integrating FOP in a Project
Date Thu, 08 Jul 2004 13:57:50 GMT
Hi evrybody !

excuse me for my english but i'm french so i will try to be clear but ...

so i have a problem with using fop. I work on an application in Java 1.4
and when i use fop to create a file on the file system in a java program it
works
BUT i can't do the same thing with my server. I would generate an PDF in a
servlet with this code :

public static void doPDF(Document xml, Document xsl, Document xslfo,
OutputStream outputstream) throws Exception
{
      DOMSource transformXSLT = new DOMSource(xsl);
      DOMResult resultatXSLFO = new DOMResult(xslfo);
      DOMSource sourceXML = new DOMSource(xml);

      logger.warn("XML TO FO TRANSFORMATION BEGIN");
      gcpmrds.xsl.xslTransform.transformUri(
                  sourceXML,
                  transformXSLT,
                  null,
                  resultatXSLFO );
      logger.warn("XML TO FO TRANSFORMATION END");

      logger.warn("FO TO PDF TRANSFORMATION BEGIN");
      File pdffile = new File("C:/Resultat.pdf");
      OutputStream out = new java.io.FileOutputStream(pdffile);
      out = new java.io.BufferedOutputStream(out);
      logger.warn("AAAAA");
      //Driver driver = new Driver((InputSource)xslfo,out);
      Driver driver = new Driver();
      logger.warn("AAAAA");
      driver.setRenderer(Driver.RENDER_PDF);
      driver.setInputSource((InputSource)xslfo);
      driver.setOutputStream(out);
      driver.run();
      out.close();
      logger.warn("FO TO PDF TRANSFORMATION END");
}

And my problem is that i haven't any exception or error but the program
never go out of the "Driver driver = new Driver()" and if i use "Driver
driver = new Driver((InputSource)xslfo,out)" it's the same problem so i
don't know what's the matter.
Perhaps i've got forget a jar ?

thanks for help !





******************************************************************
The sender's email address has changed to 
firstname.lastname@ sgcib.com. You may want to update your 
personal address book. Please see http://www.sgcib.com for more 
information.
                               **
This message and any attachments (the "message") are confidential
and intended solely for the addressee(s). Any unauthorised use or
dissemination is prohibited. E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.
                         ***************
L'adresse mail  de votre correspondant a change en prenom.nom@ sgcib.com.
Il est recommande de mettre a jour votre carnet d'addresse
personnel.Pour plus d'informations, aller  sur http://www.sgcib.com
                               **
Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et etablis a l'intention exclusive de ses
destinataires. Toute utilisation ou diffusion non autorisee est
interdite. Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute
responsabilite au titre de ce message s'il a ete altere, modifie
ou falsifie.
******************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message