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 Francesc Alted <fa...@pytables.org> on 2009/03/03 14:25:17 UTC

No ImagePreloader found for *.svg

Hi,

I'm having problems with fop (0.95) on my new openSUSE
11.1 (64-bit) machine.  What I'm trying to do is to get a PDF out
of a fo file (created with xsltproc) that includes some SVG
graphics.  fop can process the fo file, but refuses to include
the graphs.  For each SVG file, it raises the next error:

3-mar-09 12:47:24  org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: No ImagePreloader found for pytables.svg

I know that fop 0.95 can deal with these files, because it works
like a charm on my old laptop (running Debian 32-bit).  I've
installed fop from the openSUSE repository and directly from the
binary tarballs, with the same result.

I've also tried with a couple of java VMs, namely:

$ java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

and:

$ java -version
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

with identical results.

Anyone can offer some help, please?

Francesc


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


Re: AW: No ImagePreloader found for *.svg

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, in that case, it would actually be interesting to take a look at
the SVG file you're trying to use (as Vincent suggested).

On 03.03.2009 20:31:55 Francesc Alted wrote:
> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
> > > which seems good to my eyes...
> > 
> > I agree......if the CLASSPATH environment variable doesn't contain any
> > of the above JARs.
> 
> Nope.  I've unset the CLASSPATH before running fop for this case.
> 
> Francesc
> 


Jeremias Maerki


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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
> > which seems good to my eyes...
> 
> I agree......if the CLASSPATH environment variable doesn't contain any
> of the above JARs.

Nope.  I've unset the CLASSPATH before running fop for this case.

Francesc




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


Re: AW: No ImagePreloader found for *.svg

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 03.03.2009 19:46:19 Francesc Alted wrote:
> Francesc Alted <faltet <at> pytables.org> writes:
> 
> > 
> > Francesc Alted <faltet <at> pytables.org> writes:
> > 
> > > Sorry, but I'm a bit naive with java environments.  I see this file:
> > > 
> > > -rw-r--r-- 1 root root 3318083 31 jul  2008
> > > /usr/share/fop/lib/batik-all-1.7.jar
> > 
> > and the same goes for:
> > 
> > -rw-r--r-- 1 root root 517073 31 jul  2008
> > /usr/share/fop/lib/xmlgraphics-commons-1.3.1.jar
> > 
> > Francesc
> > 
> 
> As an additional check, I've done a print of the LOCALCLASSPATH variable
> inside the fop script and it prints:
> 
> /usr/share/fop/lib/xmlgraphics-commons-1.3.1.jar:/usr/share/fop/lib/xml-apis-
> ext-1.3.04.jar:/usr/share/fop/lib/xml-apis-1.3.04.jar:/usr/share/fop/lib
> /xercesImpl-2.7.1.jar:/usr/share/fop/lib/xalan-2.7.0.jar:/usr/share/fop/lib
> /servlet-2.2.jar:/usr/share/fop/lib/serializer-2.7.0.jar:/usr/share/fop/lib
> /fop-sandbox.jar:/usr/share/fop/lib/fop.jar:/usr/share/fop/lib/fop-hyph.jar:
> /usr/share/fop/lib/commons-logging-1.0.4.jar:/usr/share/fop/lib/commons-
> io-1.3.1.jar:/usr/share/fop/lib/batik-all-1.7.jar:/usr/share/fop/lib/avalon-
> framework-4.2.0.jar:/usr/share/fop/build/fop.jar:/usr/share/fop/build
> /fop-sandbox.jar:/usr/share/fop/build/fop-hyph.jar:
> 
> which seems good to my eyes...

I agree......if the CLASSPATH environment variable doesn't contain any
of the above JARs.

> Francesc



Jeremias Maerki


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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Francesc Alted <faltet <at> pytables.org> writes:

> 
> Francesc Alted <faltet <at> pytables.org> writes:
> 
> > Sorry, but I'm a bit naive with java environments.  I see this file:
> > 
> > -rw-r--r-- 1 root root 3318083 31 jul  2008
> > /usr/share/fop/lib/batik-all-1.7.jar
> 
> and the same goes for:
> 
> -rw-r--r-- 1 root root 517073 31 jul  2008
> /usr/share/fop/lib/xmlgraphics-commons-1.3.1.jar
> 
> Francesc
> 

As an additional check, I've done a print of the LOCALCLASSPATH variable
inside the fop script and it prints:

/usr/share/fop/lib/xmlgraphics-commons-1.3.1.jar:/usr/share/fop/lib/xml-apis-
ext-1.3.04.jar:/usr/share/fop/lib/xml-apis-1.3.04.jar:/usr/share/fop/lib
/xercesImpl-2.7.1.jar:/usr/share/fop/lib/xalan-2.7.0.jar:/usr/share/fop/lib
/servlet-2.2.jar:/usr/share/fop/lib/serializer-2.7.0.jar:/usr/share/fop/lib
/fop-sandbox.jar:/usr/share/fop/lib/fop.jar:/usr/share/fop/lib/fop-hyph.jar:
/usr/share/fop/lib/commons-logging-1.0.4.jar:/usr/share/fop/lib/commons-
io-1.3.1.jar:/usr/share/fop/lib/batik-all-1.7.jar:/usr/share/fop/lib/avalon-
framework-4.2.0.jar:/usr/share/fop/build/fop.jar:/usr/share/fop/build
/fop-sandbox.jar:/usr/share/fop/build/fop-hyph.jar:

which seems good to my eyes...

Francesc


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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Francesc Alted <faltet <at> pytables.org> writes:

> Sorry, but I'm a bit naive with java environments.  I see this file:
> 
> -rw-r--r-- 1 root root 3318083 31 jul  2008
> /usr/share/fop/lib/batik-all-1.7.jar

and the same goes for:

-rw-r--r-- 1 root root 517073 31 jul  2008
/usr/share/fop/lib/xmlgraphics-commons-1.3.1.jar

Francesc




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


Re: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Hi Vincent,

Vincent Hennebert <vhennebert <at> gmail.com> writes:

> 
> Hi Francesc,
> 
> Do you have a doctype declaration in your svg file?
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
>     "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

No.  Mine starts with:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
[clip]

But I doubt that the problem would be there because, as I said before,
these files works correctly with fop-0.95 in my old laptop running
Debian 32-bit (now using openSUSE 64-bit).

> 
> I’ve had problems in the past with svg files not having a doctype
> declaration, thus not recognized as being svg by FOP. But I don’t
> remember the details.
> 
> You may want to post your FO file and the SVG file so that we can try by
> ourselves (if they’re not too big).

You can find the tarball at:

http://pytables.org/temporal/test-fop.tar.gz

Regards,

Francesc




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


Re: No ImagePreloader found for *.svg

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Francesc,

Do you have a doctype declaration in your svg file?
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

I’ve had problems in the past with svg files not having a doctype
declaration, thus not recognized as being svg by FOP. But I don’t
remember the details.

You may want to post your FO file and the SVG file so that we can try by
ourselves (if they’re not too big).

HTH,
Vincent


Francesc Alted wrote:
> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
> 
>> Probably a class-loader issue. I'd avoid using the CLASSPATH environment
>> variable wherever possible (which is pretty much always). Please make
>> sure fop.jar, xmlgraphics-commons.jar and batik.jar are specified at the
>> same level in the class-loader hierarchy, i.e. in the same -cp statement
>> when starting the JVM, in the same WAR file or whatever you're doing to
>> run FOP.
> 
> Sorry, but I'm a bit naive with java environments.  I see this file:
> 
> -rw-r--r-- 1 root root 3318083 31 jul  2008 /usr/share/fop/lib/batik-all-1.7.jar
> 
> which is large enough to suppose that the entire batik is there, correct?
> If this is true, I suppose that the next lines in the main fop shell script:
> 
> # add in the dependency .jar files, which reside in $FOP_HOME/lib
> OLD_IFS=$IFS
> IFS="
> "
> DIRLIBS=${FOP_HOME}/lib/*.jar
> for i in ${DIRLIBS}
> do
>     # if the directory is empty, then it will return the input string
>     # this is stupid, so case for it
>     if [ "$i" != "${DIRLIBS}" ] ; then
>       if [ -z "$LOCALCLASSPATH" ] ; then
>         LOCALCLASSPATH=$i
>       else
>         LOCALCLASSPATH="$i"${pathSepChar}$LOCALCLASSPATH
>       fi
>     fi
> done
> 
> should be enough to include batik in the class-loader hierarchy (I've
> checked that $FOP_HOME is /usr/share/fop).  Or am I missing something?
> 
> Thanks,
> 
> Francesc

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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> Another idea, but probably with little chance of success in this
> particular case: Try replacing Xerces with the version bundled with FOP,
> i.e. put xerces.jar in <JRE-HOME>/lib/endorsed. It's really unlikely (as
> you're using Java 1.6) but maybe it's a namespace problem with the XML
> parser.

Uh. You mean something like?

$ sudo cp /usr/share/fop/lib/xercesImpl-2.7.1.jar
/usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre/lib/endorsed

In case that I've managed to do what you wanted correctly, this does not have
any effect.

> 
> You can also set the log level for
org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry
> to DEBUG level so you can observe if PreloaderSVG is actually registered.

In fop script, I've set:

LOGCHOICE=-Dorg.apache.commons.logging.Log=
org.apache.commons.logging.impl.SimpleLog

LOGLEVEL=-Dorg.apache.xmlgraphics.image.loader.spi.ImageImplRegistry=DEBUG

and the error message is:

[ERROR] FONode - Image not available: No ImagePreloader found for pytables.svg

> 
> If that doesn't help, I'm out of ideas and the only thing left is
> debugging PreloaderSVG.java in FOP.

Provided that I'm not a Java guy, that's going to be difficult.  However,
I can arrange things to allow you access my machine, in case you are interested.

Thanks,

Francesc



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


Re: AW: No ImagePreloader found for *.svg

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 03.03.2009 21:28:18 Andreas Delmelle wrote:
<snip/>
> Using the sample tarball you provided, I cannot immediately reproduce  
> any of the error messages, although I do get a complaint from  
> PreloaderSVG about an "invalid byte 1 of a 1-byte UTF-8 sequence". The  
> SVG is included in the end-result, nonetheless.
<snip/>

That would indicate that the SVG is ok. "invalid byte 1 of a 1-byte UTF-8
sequence" comes from Xerces (if I remember correctly) and it occurs when
the XML parser is fired up on a binary file during image preloading. No
chance to suppress that from FOP.

Another idea, but probably with little chance of success in this
particular case: Try replacing Xerces with the version bundled with FOP,
i.e. put xerces.jar in <JRE-HOME>/lib/endorsed. It's really unlikely (as
you're using Java 1.6) but maybe it's a namespace problem with the XML
parser.

You can also set the log level for org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry
to DEBUG level so you can observe if PreloaderSVG is actually registered.

If that doesn't help, I'm out of ideas and the only thing left is
debugging PreloaderSVG.java in FOP.

Jeremias Maerki


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


Re: AW: No ImagePreloader found for *.svg [SOLVED]

Posted by Andreas Delmelle <an...@telenet.be>.
On 05 Mar 2009, at 11:27, Francesc Alted wrote:

> /etc/alternatives/java_sdk -> /usr/lib64/jvm/java-1.5.0-gcj
>
> so, it seems that the java home was incorrectly set to the gcj one!   
> After doing
> this:

OK, that makes sense. GCJ comes bundled with its own GNU XML parser,  
which I know misses some SAX features that Xalan requires, like  
LexicalHandler... (maybe Batik requires those missing features too,  
I'm not sure)

Glad to see it was not a FOP/XG Commons bug! :-)

Andreas

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


Re: AW: No ImagePreloader found for *.svg [SOLVED]

Posted by Francesc Alted <fa...@pytables.org>.
Well, after some digging on my system, I noticed this:

/usr/lib64/jvm/java -> /etc/alternatives/java_sdk

*and*

/etc/alternatives/java_sdk -> /usr/lib64/jvm/java-1.5.0-gcj

so, it seems that the java home was incorrectly set to the gcj one!  After doing
this:

/etc/alternatives/java_sdk -> /usr/lib64/jvm/java-1.6.0-sun-1.6.0/

everything works ok now.  Here it is the log of my fop run on my test file:

$ fop -v usersguide.fo usersguide.pdf              
FOP Version 0.95                                                             
[WARN] FontInfo - Font 'Symbol,normal,700' not found. Substituting with
'Symbol,normal,400'.
[WARN] FontInfo - Font 'ZapfDingbats,normal,700' not found. Substituting with
'ZapfDingbats,normal,400'.
[WARN] BreakingAlgorithm - Line 1 of a paragraph overflows the available area by
32000mpt. (fo:block, location: 2/35840)                                        
[WARN] FontInfo - Font 'ZapfDingbats,italic,400' not found. Substituting with
'ZapfDingbats,normal,400'.

which is completely fine! :)

I don't know why the java home was set to be the gcj, but this seems a problem
with the configuration of java package in openSUSE, because I explicitly
selected the Sun JVM through:

$ sudo /usr/sbin/update-alternatives --config java

There are 3 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/lib64/jvm/jre-1.5.0-gcj/bin/java
*         2    /usr/lib64/jvm/jre-1.6.0-sun/bin/java
 +        3    /usr/lib64/jvm/jre-1.6.0-openjdk/bin/java

Press enter to keep the default[*], or type selection number: 2

and, for some reason, the command changed the /etc/alternatives/java link, but
did not succeed in (or forgot about) changing the /etc/alternatives/java_sdk
link :-((.

Well, I suppose that I should file a bug to openSUSE.

A lot of thanks for your help!  At least it served to me to figure out that
the problem had to be in my system.

Francesc


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


Re: AW: No ImagePreloader found for *.svg

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 04.03.2009 19:15:54 Andreas Delmelle wrote:
> On 04 Mar 2009, at 09:40, Francesc Alted wrote:
> 
> Hi
> 
> > I've managed to do this (changing the LOGLEVEL from INFO to DEBUG),  
> > and
> > you can see the result in:
> >
> > http://pytables.org/temporal/fop-debug.out
> 
> Ok, so we know for certain that the PreloaderSVG is registered nicely.

Yeah, would have been easier if it wasn't. :-(

> (Below some more info, which is probably only useful for devs)
> Following the trail from where the error message is thrown:
> ExternalGraphic.bind()
> -> commons.image.loader.ImageManager.getImageInfo()
> -> commons.image.loader.ImageManager.preloadImage()
> 
> Now, it seems to me that, depending on the ImagePreloader  
> implementation, it is possible for this error message to appear, even  
> though a preloader was found.
> 
> I mean, looking at ImageManager.preloadImage(), if PreloaderSVG is  
> present, but its preloadImage() returns null due to an internal  
> IOException, then we'll get an ImageException giving the impression  
> that the preloader was not found, while it was merely unable to  
> process the file for some reason.

But the exception should have appeared on Francesc's log in that case
which it didn't.

From the log:
[..]
[DEBUG] AbstractImageSessionContext - Creating new Source for pytables.svg
[ERROR] FONode - Image not available: No ImagePreloader found for pytables.svg
[..]

There should have been a DEBUG-level message between the two if the
PreloaderSVG is used and an IOException occurred. That totally confuses
me.

I've now realized that I format the exception just with a toString()
fallback which will swallow an eventual nested exception. Maybe that
could have given us additional information. But probably not, since it's
clearly originating from ImageManager.preloadImage().

> Is it expected/permitted for a preloader to obtain a null ImageInfo in  
> preloadImage() and simply return it?

Yes

> How do we distinguish between a  
> preloader that is not suited for the file format and one that should  
> be, but is unable to load the file...?

Normally:
- not suited: returns null
- detected but unable: ImageException

However, in the case of SVG, this is difficult since the delegated
method simply throw an IOException if the DOM could not be built.

I've updated the Javadocs for ImagePreloader. It was incomplete.

> Regarding the failing PNG: it's a very long shot, but this could be  
> related to the ImageIO implementation, as the  
> commons.image.loader.impl.imageio.ImageIOPreloader is used for those.

I agree. I had problems with ImageIO PNG codecs before in exotic class
libraries, but we're talking Sun Java and OpenJDK here, although we
still have to treat OpenJDK with care.



Jeremias Maerki


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


Re: AW: No ImagePreloader found for *.svg

Posted by Andreas Delmelle <an...@telenet.be>.
On 04 Mar 2009, at 09:40, Francesc Alted wrote:

Hi

> I've managed to do this (changing the LOGLEVEL from INFO to DEBUG),  
> and
> you can see the result in:
>
> http://pytables.org/temporal/fop-debug.out

Ok, so we know for certain that the PreloaderSVG is registered nicely.

(Below some more info, which is probably only useful for devs)
Following the trail from where the error message is thrown:
ExternalGraphic.bind()
-> commons.image.loader.ImageManager.getImageInfo()
-> commons.image.loader.ImageManager.preloadImage()

Now, it seems to me that, depending on the ImagePreloader  
implementation, it is possible for this error message to appear, even  
though a preloader was found.

I mean, looking at ImageManager.preloadImage(), if PreloaderSVG is  
present, but its preloadImage() returns null due to an internal  
IOException, then we'll get an ImageException giving the impression  
that the preloader was not found, while it was merely unable to  
process the file for some reason.

Is it expected/permitted for a preloader to obtain a null ImageInfo in  
preloadImage() and simply return it? How do we distinguish between a  
preloader that is not suited for the file format and one that should  
be, but is unable to load the file...?

Regarding the failing PNG: it's a very long shot, but this could be  
related to the ImageIO implementation, as the  
commons.image.loader.impl.imageio.ImageIOPreloader is used for those.



Cheers

Andreas

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


Re: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Vincent,

Vincent Hennebert <vhennebert <at> gmail.com> writes:

> I can render your document without any problem on my 64-bit Ubuntu, both
> with FOP 0.95 and FOP Trunk.

Well, it's a relief to know that my machine would be able to do the same too.
The problem now is how to do it...

> 
> You said you installed FOP from the OpenSUSE repository, so I’d suspect
> there is a packaging problem there. Is XML Graphics a separate package
> that FOP depends on? What version is it?

No.  It seems that fop in openSUSE is pretty much self-contained.  Here are
the requisites of the package:

Requires:
/bin/sh
jre
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsLzma) <= 4.4.2-1

so, it seems to depend only on having a JRE installed, which makes sense.

> Can you try again with a version of FOP directly downloaded from our
> website:
> http://xmlgraphics.apache.org/fop/download.html#binary
> 
> If that works with that version then this indeed is an OpenSUSE
> packaging problem. You may then want to notify the maintainers of your
> problem.

Unfortunately, and as I have said in an earlier message, I've tried this out
already, but to no avail.

Francesc




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


Re: No ImagePreloader found for *.svg

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Francesc,

Francesc Alted wrote:
<snip/>
>> Anyway, something else to check:
>>> 3-mar-09 8:26:09
>>> org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
>>> SEVERE: Background image not available:
>>> http://docbook.sourceforge.net/release/images/draft.png
>> Does this PNG fail because you are not connected to the internet? Is  
>> the URL incorrect, or could this be related to the current issue?
> 
> I don't know, but I have access to this file for sure:
> 
> wget http://docbook.sourceforge.net/release/images/draft.png
> --2009-03-04 09:37:00--  http://docbook.sourceforge.net/release/images/draft.png
> S'està resolent docbook.sourceforge.net... 216.34.181.96
> S'està connectant a docbook.sourceforge.net|216.34.181.96|:80...connectat.
> HTTP: s'ha enviat la petició, s'està esperant una resposta...200 OK
> Mida: 17454 (17K) [image/png]
> S'està desant a: «draft.png.1»
> 
> 100%[======================================>] 17.454       102K/s   en 0,2s
> 
> 2009-03-04 09:37:01 (102 KB/s) - s'ha desat «draft.png» [17454/17454]
>  
>> Using the sample tarball you provided, I cannot immediately reproduce  
>> any of the error messages, although I do get a complaint from  
>> PreloaderSVG about an "invalid byte 1 of a 1-byte UTF-8 sequence". The  
>> SVG is included in the end-result, nonetheless.
> 
> Yeah.  As I have said, fop seems to work perfectly in my old laptop too :-\
> I don't know, but that could be a 64-bit problem?  Is anybody running
> a 64-bit OS that can give the tarball a try?

I can render your document without any problem on my 64-bit Ubuntu, both
with FOP 0.95 and FOP Trunk.

You said you installed FOP from the OpenSUSE repository, so I’d suspect
there is a packaging problem there. Is XML Graphics a separate package
that FOP depends on? What version is it?
Can you try again with a version of FOP directly downloaded from our
website:
http://xmlgraphics.apache.org/fop/download.html#binary

If that works with that version then this indeed is an OpenSUSE
packaging problem. You may then want to notify the maintainers of your
problem.

HTH,
Vincent

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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Andreas Delmelle <andreas.delmelle <at> telenet.be> writes:

> Not really as detailed as I had hoped, but I guess that would need  
> some more fiddling with the logger options... See the fop script, all  
> the way at the bottom, and uncomment  the LOGCHOICE for Commons  
> SimpleLog and the LOGLEVEL. If I do that over here, the first lines  
> immediately show which ImagePreloader implementations are registered.

I've managed to do this (changing the LOGLEVEL from INFO to DEBUG), and
you can see the result in:

http://pytables.org/temporal/fop-debug.out

> 
> Anyway, something else to check:
> > 3-mar-09 8:26:09
> > org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
> > SEVERE: Background image not available:
> > http://docbook.sourceforge.net/release/images/draft.png
> 
> Does this PNG fail because you are not connected to the internet? Is  
> the URL incorrect, or could this be related to the current issue?

I don't know, but I have access to this file for sure:

wget http://docbook.sourceforge.net/release/images/draft.png
--2009-03-04 09:37:00--  http://docbook.sourceforge.net/release/images/draft.png
S'està resolent docbook.sourceforge.net... 216.34.181.96
S'està connectant a docbook.sourceforge.net|216.34.181.96|:80...connectat.
HTTP: s'ha enviat la petició, s'està esperant una resposta...200 OK
Mida: 17454 (17K) [image/png]
S'està desant a: «draft.png.1»

100%[======================================>] 17.454       102K/s   en 0,2s

2009-03-04 09:37:01 (102 KB/s) - s'ha desat «draft.png» [17454/17454]
 
> Using the sample tarball you provided, I cannot immediately reproduce  
> any of the error messages, although I do get a complaint from  
> PreloaderSVG about an "invalid byte 1 of a 1-byte UTF-8 sequence". The  
> SVG is included in the end-result, nonetheless.

Yeah.  As I have said, fop seems to work perfectly in my old laptop too :-\
I don't know, but that could be a 64-bit problem?  Is anybody running
a 64-bit OS that can give the tarball a try?

Francesc


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


Re: AW: No ImagePreloader found for *.svg

Posted by Andreas Delmelle <an...@telenet.be>.
On 03 Mar 2009, at 20:38, Francesc Alted wrote:

Hi

> Andreas Delmelle <andreas.delmelle <at> telenet.be> writes:
>>
>> Try running FOP with the '-d' switch. You should get a bit more info
>> about what happens before the error occurs, which could give a hint  
>> as
>> to what's going wrong...
>
> Here it goes (the output is a bit badly-formatted because the  
> composer interface
> of Gmane doesn't allow me to send more than 80 columns per line, but  
> I think it
> is readable enough):

Not really as detailed as I had hoped, but I guess that would need  
some more fiddling with the logger options... See the fop script, all  
the way at the bottom, and uncomment  the LOGCHOICE for Commons  
SimpleLog and the LOGLEVEL. If I do that over here, the first lines  
immediately show which ImagePreloader implementations are registered.

Anyway, something else to check:
> 3-mar-09 8:26:09
> org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
> SEVERE: Background image not available:
> http://docbook.sourceforge.net/release/images/draft.png

Does this PNG fail because you are not connected to the internet? Is  
the URL incorrect, or could this be related to the current issue?

Using the sample tarball you provided, I cannot immediately reproduce  
any of the error messages, although I do get a complaint from  
PreloaderSVG about an "invalid byte 1 of a 1-byte UTF-8 sequence". The  
SVG is included in the end-result, nonetheless.


Regards

Andreas

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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Andreas Delmelle <andreas.delmelle <at> telenet.be> writes:

> No, you're correct.
> 
> Everything you posted after this looks correct too, so I'm a bit  
> puzzled. The file-permissions should be fine. I just tried changing  
> them to read-only on my end, and this posed no problems whatsoever.
> 
> Try running FOP with the '-d' switch. You should get a bit more info  
> about what happens before the error occurs, which could give a hint as  
> to what's going wrong...

Here it goes (the output is a bit badly-formatted because the composer interface
of Gmane doesn't allow me to send more than 80 columns per line, but I think it
is readable enough):

3-mar-09 8:26:08  org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
3-mar-09 8:26:08  org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09
org.apache.fop.fo.properties.CommonBorderPaddingBackground <init>
SEVERE: Background image not available:
http://docbook.sourceforge.net/release/images/draft.png

3-mar-09 8:26:09 org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: No ImagePreloader found for pytables.svg

3-mar-09 8:26:09 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'Symbol,normal,700' not found. Substituting with
'Symbol,normal,400'.

3-mar-09 8:26:09 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with
'ZapfDingbats,normal,400'.

3-mar-09 8:26:11 org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'ZapfDingbats,italic,400' not found. Substituting with
'ZapfDingbats,normal,400'.

Thanks for the help so far,

Francesc




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


Re: AW: No ImagePreloader found for *.svg

Posted by Andreas Delmelle <an...@telenet.be>.
On 03 Mar 2009, at 19:20, Francesc Alted wrote:

Hi

> Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:
>
>>
>> Probably a class-loader issue. I'd avoid using the CLASSPATH  
>> environment
>> variable wherever possible (which is pretty much always). Please make
>> sure fop.jar, xmlgraphics-commons.jar and batik.jar are specified  
>> at the
>> same level in the class-loader hierarchy, i.e. in the same -cp  
>> statement
>> when starting the JVM, in the same WAR file or whatever you're  
>> doing to
>> run FOP.
>
> Sorry, but I'm a bit naive with java environments.  I see this file:
>
> -rw-r--r-- 1 root root 3318083 31 jul  2008 /usr/share/fop/lib/batik- 
> all-1.7.jar
>
> which is large enough to suppose that the entire batik is there,  
> correct?


Yes.

> If this is true, I suppose that the next lines in the main fop shell  
> script:
> <snip />
>
> should be enough to include batik in the class-loader hierarchy (I've
> checked that $FOP_HOME is /usr/share/fop).  Or am I missing something?

No, you're correct.

Everything you posted after this looks correct too, so I'm a bit  
puzzled. The file-permissions should be fine. I just tried changing  
them to read-only on my end, and this posed no problems whatsoever.

Try running FOP with the '-d' switch. You should get a bit more info  
about what happens before the error occurs, which could give a hint as  
to what's going wrong...


Regards

Andreas

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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> Probably a class-loader issue. I'd avoid using the CLASSPATH environment
> variable wherever possible (which is pretty much always). Please make
> sure fop.jar, xmlgraphics-commons.jar and batik.jar are specified at the
> same level in the class-loader hierarchy, i.e. in the same -cp statement
> when starting the JVM, in the same WAR file or whatever you're doing to
> run FOP.

Sorry, but I'm a bit naive with java environments.  I see this file:

-rw-r--r-- 1 root root 3318083 31 jul  2008 /usr/share/fop/lib/batik-all-1.7.jar

which is large enough to suppose that the entire batik is there, correct?
If this is true, I suppose that the next lines in the main fop shell script:

# add in the dependency .jar files, which reside in $FOP_HOME/lib
OLD_IFS=$IFS
IFS="
"
DIRLIBS=${FOP_HOME}/lib/*.jar
for i in ${DIRLIBS}
do
    # if the directory is empty, then it will return the input string
    # this is stupid, so case for it
    if [ "$i" != "${DIRLIBS}" ] ; then
      if [ -z "$LOCALCLASSPATH" ] ; then
        LOCALCLASSPATH=$i
      else
        LOCALCLASSPATH="$i"${pathSepChar}$LOCALCLASSPATH
      fi
    fi
done

should be enough to include batik in the class-loader hierarchy (I've
checked that $FOP_HOME is /usr/share/fop).  Or am I missing something?

Thanks,

Francesc



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


Re: AW: No ImagePreloader found for *.svg

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Probably a class-loader issue. I'd avoid using the CLASSPATH environment
variable wherever possible (which is pretty much always). Please make
sure fop.jar, xmlgraphics-commons.jar and batik.jar are specified at the
same level in the class-loader hierarchy, i.e. in the same -cp statement
when starting the JVM, in the same WAR file or whatever you're doing to
run FOP.

On 03.03.2009 14:49:10 Francesc Alted wrote:
> Georg Datterl <georg.datterl <at> geneon.de> writes:
> > 
> > Hi Francesc, 
> > 
> > Can we assume, batik.jar is available? 
> > 
> 
> Hi Georg,
> 
> Well, I suppose that with the jar that comes with fop and installed in:
> 
> /usr/share/fop-0.95/lib/batik-all-1.7.jar
> 
> would be more than enough, right?
> 
> At any rate, I'have installed the batik package from the openSUSE repo,
> and then set:
> 
> $ export CLASSPATH=/usr/share/batik/batik.jar
> 
> but still the same error:
> 
> 3-mar-09 2:46:27  org.apache.fop.fo.flow.ExternalGraphic bind
> SEVERE: Image not available: No ImagePreloader found for pytables.svg
> 
> Thanks,
> 
> Francesc
> 
> 



Jeremias Maerki


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


Re: AW: No ImagePreloader found for *.svg

Posted by Francesc Alted <fa...@pytables.org>.
Georg Datterl <georg.datterl <at> geneon.de> writes:
> 
> Hi Francesc, 
> 
> Can we assume, batik.jar is available? 
> 

Hi Georg,

Well, I suppose that with the jar that comes with fop and installed in:

/usr/share/fop-0.95/lib/batik-all-1.7.jar

would be more than enough, right?

At any rate, I'have installed the batik package from the openSUSE repo,
and then set:

$ export CLASSPATH=/usr/share/batik/batik.jar

but still the same error:

3-mar-09 2:46:27  org.apache.fop.fo.flow.ExternalGraphic bind
SEVERE: Image not available: No ImagePreloader found for pytables.svg

Thanks,

Francesc






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