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]

Reply via email to