You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by ne...@swisslab.de on 2005/07/25 10:31:02 UTC

FOP 0.20.5 and PNG

Hello List,

I know this topic has been discussed several times, and I've so fare figured
out, that I need Jimi in order to get my PNG graphics displayed in the
result PDF file. 
So I downloaded Jimi 1.0. What I got was a collection of java files. Being
quite a Java nerd, it took me some time to compile the java file to class
archives (yes, now I know that there is a file called compile.bat....).
After some search, I figured out that I had to compile this again, to
generate a jar archive. I build this myself using this string:
set JLIB=C:\work\FO\lib\Jimi\src\classes\com\sun\jimi\core\
jar -cvf jimi1_0.jar %JLIB%Jimi.class %JLIB%JimiUtils.class
%JLIB%JimiProDependencies.class %JLIB%encoder/png/PNGEncoderFactory.class
%JLIB%encoder/jpg/JPGEncoderFactory.class
%JLIB%decoder/png/PNGDecoderFactory.class
%JLIB%decoder/gif/GIFDecoderFactory.class
%JLIB%decoder/builtin/BuiltinDecoderFactory.class %JLIB%util/JimiUtil.class
%JLIB%util/JimiImageSerializer.class %JLIB%util/ColorReducer.class
%JLIB%util/JimiImageColorReducer.class
%JLIB%raster/JimiRasterImageCategorizer.class %JLIB%filters/*.class
%JLIB%component/JimiCanvas.class %JLIB%component/JimiCanvasLW.class
%JLIB%options/*.class

I put the jimi1_0.jar file into fop/lib and added the lib into the Classpath
of fop:

@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
@REM set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\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%\jimi1_0.jar

java -cp "%LOCALCLASSPATH%" -Xms256m -Xmx512m org.apache.fop.apps.Fop %1 %2
%3 %4 %5 %6 %7 %8

After that I expected to be able to compile PNG files successfully, but was
taeched something better after I started FOP again and got exactly the same
error as before, which by the way was:

[INFO] JAI support was not installed (read: not present at build time).
Trying to use Jimi instead
[ERROR] Error while creating area : Error creating FopImage object
(file://swb1haus/swl/develop/PDF-
output/jko/kunde/2005_07_22_15_08_3506275203_IMI.png) : Jimi image library
not available


Can someone please help me getting the PNG files into my PDFs?

Thanks a lot!
Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.20.5 and PNG

Posted by Chris Bowditch <bo...@hotmail.com>.
news@swisslab.de wrote:
> Hello List,
> 
> I know this topic has been discussed several times, and I've so fare figured
> out, that I need Jimi in order to get my PNG graphics displayed in the
> result PDF file. 
> So I downloaded Jimi 1.0. What I got was a collection of java files. Being
> quite a Java nerd, it took me some time to compile the java file to class
> archives (yes, now I know that there is a file called compile.bat....).
> After some search, I figured out that I had to compile this again, to
> generate a jar archive. I build this myself using this string:

You don't need to do any of this. Jimi is already built for you. Perhaps 
you downloaded it from the wrong place? The link to the download and how 
to include Jimi so FOP will recognise it is documented here:

http://xml.apache.org/fop/graphics.html#jimi

<snip/>

> 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%\jimi1_0.jar

Notice that Jimi is already in the classpath as jimi-1.0.jar. I believe 
you have given it the wrong name which is (maybe) why FOP doesn't think 
it's installed.

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org