Re: [afp-renderer-users] can't get it working :-(
Brought to you by:
towny,
tumbarumba
From: Joe S. <jo...@ex...> - 2004-10-12 16:19:17
|
Hi Michael, Unfortunately the docs on the website aren't quite complete at this point. The main issue not addressed right now is processing the input files (see http://afp-renderer.sourceforge.net/getting-started.html#Process_Input_Files). That one sentence doesn't really explain in enough detail what is required. The fop command line doesn't yet know how to handle the -afp output format, which means that you will (currently) have to write some java code to bootstrap the output renderer. Unfortunately, I don't have the appropriate example code handy this second, but Pete (the main developer) should be able to provide it fairly soon. I'll make sure website is updated with something more useful. The fop embedding page at http://xml.apache.org/fop/embedding.html gives the general idea of what is needed, except that the afp renderer should be specified as the driver. As you've found out, this project has just started and so the documentation isn't quite there yet (but we're working on it). Cheers, Joe On Tue, 2004-10-12 at 08:13, Michael Knigge wrote: > All, > > I can't gat this AFP-renderer working and I hope that someone here can help > me. > > What I did: > > At fist I've installed J2SE (Runtime only on WinXP Pro). Then I've > downloaded FOP (0.20.5) and the AFP-renderer. > > I put the afp-renderer-bin-1.0.1.jar file to %LOCAL_FOP_HOME%lib and added > this file to my %LOCALCLASSPATH%. > > I also stored the afp-fonts.dtd and afp-fonts.xml file in the same directory > where I put the afp-renderer-bin-1.0.1.jar file. > > Then I've created a directory named afp-font-resources in the same directory > and put my resources there (for testing purposes, I put there some afp-fonts > and renamed them so the match the names in your sample afp-fonts.* files). > > For my understanding, I did everything mentioned on the web-site. > > Then, I've tried to run FOP: > > java -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop -d -xml test.xml -xsl > test.xslt -afp test.afp > > > But... test.afp is not created. What did I wrong? > > Hope someone can help me.... > > Thanks, > Michael > > > Here is the .BAT I've used: > > @ECHO OFF > > rem %~dp0 is the expanded pathname of the current script under NT > set LOCAL_FOP_HOME= > if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0 > > set LIBDIR=%LOCAL_FOP_HOME%lib > set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar > set > LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-cvs-20020806.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar > set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\afp-renderer-bin-1.0.1.jar > > java -cp "%LOCALCLASSPATH%" org.apache.fop.apps.Fop -d -xml test.xml -xsl > test.xslt -afp test.afp > > > And here is the output from FOP: > > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [INFO] base directory: file:/C:/Dokumente und Einstellungen/Default/Eigene > Dateien/Test/fop-0.20.5/../ > [INFO] FOP 0.20.5 > [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser > [ERROR] null > org.apache.fop.apps.FOPException > at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111) > at org.apache.fop.apps.Fop.main(Fop.java:62) > > --------- > > java.lang.NullPointerException > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileOutputStream.<init>(Unknown Source) > at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:101) > at org.apache.fop.apps.Fop.main(Fop.java:62) > > --------- > > java.lang.NullPointerException > at java.io.FileOutputStream.<init>(Unknown Source) > at java.io.FileOutputStream.<init>(Unknown Source) > at > org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:101) > at org.apache.fop.apps.Fop.main(Fop.java:62) > |