Hi,

if all you want to do is transform an FO file into PDF (i.e. not embed the
fop classes
in a programm) then you can run fop simply by calling:

fop.sh yourfile.fo yourfile.pdf

or (in win):

fop.bat yourfile.fo yourfile.pdf

HTH,

Michiel

$ -----Original Message-----
$ From: Braniganz [mailto:[EMAIL PROTECTED]]
$ Sent: dinsdag 3 juli 2001 14:01
$ To: [EMAIL PROTECTED]
$ Subject: Java transformation from xsl-fo to pdf
$ 
$ 
$     Hi,
$ 
$ I need transform a XSL-FO file to a PDF file.
$ I am a beginner in Java, the next code would be correct? What 
$ have I to
$ change?
$ 
$ Code:
$ 
$ import javax.xml.transform.*;
$ import javax.xml.transform.stream.*;
$ import java.io.File;
$ 
$ import org.apache.fop.apps.Fop;
$ 
$ public class pdf {
$ 
$     public static void main(String[] args) throws Exception {
$         File in = new File(args[0]);
$         File out = new File(args[1]);
$ 
$ 
$  Driver driver=new Driver();
$ 
$  driver.setRenderer(Driver.RENDER_PDF);
$ 
$         driver.setWriter(new PrintWriter(new FileWriter(out)));
$  driver.buildFOTree((Parser)parser, new InputSource(in) );
$  driver.format();
$  driver.render();
$ 
$         }
$ }
$ 
$ I use the next libraries:
$ fop.jar;xerces-1.2.3.jar;w3c.jar;xalan-2.0.0.jar;jimi-1.0.jar
$ 
$ Where can I find a correct code?
$ 
$     Thanks
$ 
$ 
$ ---------------------------------------------------------------------
$ To unsubscribe, e-mail: [EMAIL PROTECTED]
$ For additional commands, email: [EMAIL PROTECTED]
$ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to