Have a look at the javadocs of org.xml.sax.InputSource. It will tell you
that a String parameter in the constructor is a SystemID which
corresponds more or less to a URL. So if you specify a relative path
it's resolved by applying the base URL. And that's why it worked. I'd
use:
new InputSource(new FileInputStream("d:\\projects\\FOPTest.fo"))
> i have the following java code to generate a pdf file:
>
> Options options = new Options();
> options.loadUserconfiguration("userconfig.xml");
>
> Driver driver = new Driver( new InputSource( "d:\\projects\\FOPTest.fo" ),
> new FileOutputStream( "d:\\projects\\FOPTest.pdf" ) );
> driver.setRenderer( Driver.RENDER_PDF );
> driver.run();
>
>
> it's for sure, that the FOPTest.fo file is in the folder projects, but FOP
> says file not found exception.
>
> when i have the fo-file in the same folder as the executable class ( like
> this:
> Driver driver = new Driver( new InputSource( "FOPTest.fo" ), new
> FileOutputStream( "FOPTest.pdf" ) ); )
>
> it works.
> but when i have the source fo file in a different order i get that
> exception.
>
> anybody know why addressing the fo-file doesn't work ?
Freundliche Gr�sse
OUTLINE AG
Jeremias M�rki
mailto:[EMAIL PROTECTED]
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]