You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Vinny Iyer <vi...@palgraphics.com> on 2001/08/06 21:13:12 UTC

svg help.

Hi.
I'm using fop 0.19 along with batik 1.0 to convert an fo file to pdf.
The batch file i'm using uses the following command
java -cp fop.jar;batik.jar;xalan-2.0.0.jar;xerces-1.2.3.jar;jimi-1.0.jar
org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8

also in the .fo file i'm using

<fo:external-graphic src="file:C:/JBuilder4/newjunk/image.svg"/>

this seems to work fine as long as the image is a jpg/gif etc.
but if its an SVG image, the batch file does not terminate.
If I close the dos window manually or cancel the batch processing,  the pdf
file does display the SVG image in it correctly.
Also, if I try this using a servlet, then the SVG image does not show up at
all.
Is there any way I can get it to display from a servlet, or terminate the
batch file. I am assuming this is something to do with batik since it
happens only with svg files. Please help me out. Thanks.

Vinny.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


RE: svg help.

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "VI" == Vinny Iyer <vi...@palgraphics.com> writes:

VI> I read that it might be caused by a conflict between w3c.jar and
VI> batik.jar but I never had the w3c.jar.

    The conflict is with an incomplete implementation of DOM level 2
(I think, this is really out of my area).

VI> Also, I have only the batik.jar in my classpath (which works fine
VI> for the batch file), do I need other batik jars like batik-ext.jar
VI> etc. ?  Here is a list of all the jars I have included in the
VI> project. Maybe one of them is causing the conflict.

    I'm really not a 'DOM guy' but I think xerces may have to come
after the Batik stuff on the classpath... Basically I would put Batik
first, Fop second, and the rest of the stuff later :)

    Also be aware that stuff in the jre/lib/ext dir is also
'on your classpath' and can cause problems.  I would check all the
jars for classes in the w3c package:

In UNIX:

% jar -tvf XXX.jar | grep org.w3c

VI> servlet.jar fop.jar xml.jar xalan-2.0.0.jar jimi-1.0.jar cos.jar
VI> xerces-1.2.3.jar jdom.jar xalanj1compat.jar batik.jar

VI> Thanks again for your help and patience.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


RE: svg help.

Posted by Vinny Iyer <vi...@palgraphics.com>.
Like you suggested, I've checked the path and it is correct. The servlet
generates the pdf correctly if i use gif/jpgs etc, but when I use SVG it
gives me

java.lang.NoSuchMethodError 	at
org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFacto
ry.java:181)........etc.

I read that it might be caused by a conflict between w3c.jar and batik.jar
but I never had the w3c.jar.

Also, I have only the batik.jar in my classpath(which works fine for the
batch file). do I need other batik jars like batik-ext.jar etc. ?
Here is a list of all the jars I have included in the project. Maybe one of
them is causing the conflict.

servlet.jar
fop.jar
xml.jar
xalan-2.0.0.jar
jimi-1.0.jar
cos.jar
xerces-1.2.3.jar
jdom.jar
xalanj1compat.jar
batik.jar

Thanks again for your help and patience.

Vinny.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Re: svg help.

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Mon, 06 Aug 2001 21:13:12 Vinny Iyer wrote:
> Hi.
> I'm using fop 0.19 along with batik 1.0 to convert an fo file to pdf.
> The batch file i'm using uses the following command
> java -cp fop.jar;batik.jar;xalan-2.0.0.jar;xerces-1.2.3.jar;jimi-1.0.jar
> org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8
> 
> also in the .fo file i'm using
> 
> <fo:external-graphic src="file:C:/JBuilder4/newjunk/image.svg"/>
> 
> this seems to work fine as long as the image is a jpg/gif etc.
> but if its an SVG image, the batch file does not terminate.
> If I close the dos window manually or cancel the batch processing,  the
> pdf
> file does display the SVG image in it correctly.

This is in the current cvs as mentioned, in
org.apache.fop.apps.CommandLineStarter.

> Also, if I try this using a servlet, then the SVG image does not show up
> at
> all.
> Is there any way I can get it to display from a servlet, or terminate the
> batch file. I am assuming this is something to do with batik since it
> happens only with svg files. Please help me out. Thanks.

You might want to check:
- does your servlet have a display, needed for awt things (okay its on
windows so it isn't relevant)
- is you path correct and accessible to the servlet
- classpath


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


svg help.

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "VI" == Vinny Iyer <vi...@palgraphics.com> writes:

VI> this seems to work fine as long as the image is a jpg/gif etc.
VI> but if its an SVG image, the batch file does not terminate.  

    In the 0.19 release they did not put a System.exit(0) call at the
end of main, this is needed when working with Batik, because Batik
initializes the AWT toolkit, which starts an event thread which is
marked as non-deamon.  I'm told the current CVS versions of FOP have
this fixed.

VI> If I close the dos window manually or cancel the batch processing,
VI> the pdf file does display the SVG image in it correctly.  

VI> Also, if I try this using a servlet, then the SVG image does not
VI> show up at all.  

    I don't know anything about servlets, but you might get lucky and
have it be a related problem that is also fixed in current CVS :)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org