bonjour
je voudrais convertir un fichier xml en pdf le code source est

Code Java : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public static void creerPDF(String xml, String xsl, String pdf) throws Exception{
   // création du résultat (pdf)
   Driver driver = new Driver();
   driver.setRenderer(Driver.RENDER_PDF);
   driver.setOutputStream(new java.io.FileOutputStream(pdf));
   Result resultat = new SAXResult(driver.getContentHandler());
 
   // récupération de la source xml
   Source source = new StreamSource(xml);
 
   // création du transformer en fonction du xsl
   Source style = new StreamSource(xsl);
   TransformerFactory transformerFactory = TransformerFactory.newInstance();
   Transformer transformer = transformerFactory.newTransformer(style);
 
   // transformation
   transformer.transform(source, resultat);
}

mais je ne possède pas la bibliothèque FOP...svp est ce que vous l'avez?

merci