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 Fred Romelfanger <fr...@stsci.edu> on 2001/06/19 05:01:03 UTC

Is using Batik without an X display possible?

I am trying to use batik with xml-fop to generate a document
non-interactively.
Java throws an exception when it tries to initialize the
java.awt.SystemColor class
which is referenced from
org.apache.batik.css.value.DefaultSystemColorResolver.
The error I get is:
Exception in thread "main" java.lang.InternalError: Can't connect to X11
window server using ':0.0' as the value of the DISPLAY variable.

Any suggestions for using Batik in a non-interactive "batch" mode on a
Unix (Sun)
box?
                                      Thanks,
                                           Fred Romelfanger
                                           fred@stsci.edu


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


Re: Is using Batik without an X display possible?

Posted by Thierry Kormann <tk...@sophia.inria.fr>.
On Tuesday 19 June 2001 05:01, you wrote:
> I am trying to use batik with xml-fop to generate a document
> non-interactively.
> Java throws an exception when it tries to initialize the
> java.awt.SystemColor class
> which is referenced from
> org.apache.batik.css.value.DefaultSystemColorResolver.
> The error I get is:
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window server using ':0.0' as the value of the DISPLAY variable.
>
> Any suggestions for using Batik in a non-interactive "batch" mode on a
> Unix (Sun)
> box?

This topic was discusssed few days ago but to summarize, you need to have an 
X server installed on this machin.

Regards,
Thierry.


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


Images imbedded in SVG

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "MC" == Mark Claassen <ma...@donnell.com> writes:

MC> At JavaOne I asked if images could be embedded in an SVG file, and
MC> I understood that they could be.  

    They can be.

MC> Since then I have looked for more information and found none.  I
MC> found the image tag, but the examples just have links to other
MC> files, and not the encoded image.  

    In SVG the href must support the 'data' protocol in the URL.  This
allows data to be inlined in the url.

MC> If SVG can actaully do this, are there examples anywhere?  

    Check out samples/tests/dataProtocol.svg

MC> Does Batik support this at this point?

    Yes, Batik supports the data protocol for all file formats
supported by Batik (JPEG, PNG, TIFF).

    We even support this for output from the SVGGraphics2D.  In fact
this is the default way to handle the various drawImage calls, you can
also have the SVGGraphics2D store drawn images as a seperate files
that get referenced, but that requires that you setup an alternate
ImageHandler.


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


RE: Images imbedded in SVG

Posted by Mark Claassen <ma...@donnell.com>.
I was continuing to look for an encoder also in some books since I knew I
had seen one somewhere.  In the O'Reilly "Java Servlet Programming" by Jason
Hunter (on page 226) book is a reference to sun.misc.BASE64Decoder().  There
is a corresponding BASE64Encoder as well. This is an undocumented vm
specific class, but I knew I had seen one.  It seems like this would be a
fairly common thing for xml parsers and servlets to do and should be in the
language.  Maybe I will put in an RFE on the Developer Connection.

Mark

.and servlet book by Jason Hunter I guess Sun has made one
> -----Original Message-----
> From: Thomas E Deweese [mailto:thomas.deweese@kodak.com]
> Sent: Wednesday, June 20, 2001 9:42 AM
> To: batik-dev@xml.apache.org
> Subject: RE: Images imbedded in SVG
>
>
> >>>>> "MC" == Mark Claassen <ma...@donnell.com> writes:
>
> MC> I feel quite humble asking this, but are there any libraries that
> MC> do encoding (base64 or UUencode) in jdk1.3?  There is
> MC> java.net.URLEncoder, but I am not sure if that is the same thing.
>
>     There isn't anything I know of in JDK 1.3.  However the Batik
> distribution contains classes that do this, see the
> org.apache.batik.util package.
>
> MC> Thanks again.
>
>     Your welcome.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org
>


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


RE: Images imbedded in SVG

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "MC" == Mark Claassen <ma...@donnell.com> writes:

MC> I feel quite humble asking this, but are there any libraries that
MC> do encoding (base64 or UUencode) in jdk1.3?  There is
MC> java.net.URLEncoder, but I am not sure if that is the same thing.

    There isn't anything I know of in JDK 1.3.  However the Batik
distribution contains classes that do this, see the
org.apache.batik.util package.

MC> Thanks again.

    Your welcome.

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


RE: Images imbedded in SVG

Posted by Mark Claassen <ma...@donnell.com>.
Thanks for your help...  Also to Mr. Deweese.

I feel quite humble asking this, but are there any libraries that do
encoding (base64 or UUencode) in jdk1.3?  There is java.net.URLEncoder, but
I am not sure if that is the same thing.

Thanks again.

> -----Original Message-----
> From: Thierry Kormann [mailto:tkormann@sophia.inria.fr]
> Sent: Wednesday, June 20, 2001 3:38 AM
> To: batik-dev@xml.apache.org
> Subject: Re: Images imbedded in SVG
>
>
> On Tuesday 19 June 2001 23:26, you wrote:
> > At JavaOne I asked if images could be embedded in an SVG file, and I
> > understood that they could be.  Since then I have looked for more
> > information and found none.  I found the image tag, but the
> examples just
> > have links to other files, and not the encoded image.  If SVG
> can actaully
> > do this, are there examples anywhere?  Does Batik support this at this
> > point?
>
> You can have a look at the samples/tests/dataProtocol.svg
> The image is embeded using the base 64 encoding.
>
> Thierry.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org
>


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


Re: Images imbedded in SVG

Posted by Thierry Kormann <tk...@sophia.inria.fr>.
On Tuesday 19 June 2001 23:26, you wrote:
> At JavaOne I asked if images could be embedded in an SVG file, and I
> understood that they could be.  Since then I have looked for more
> information and found none.  I found the image tag, but the examples just
> have links to other files, and not the encoded image.  If SVG can actaully
> do this, are there examples anywhere?  Does Batik support this at this
> point?

You can have a look at the samples/tests/dataProtocol.svg
The image is embeded using the base 64 encoding.

Thierry.


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


Images imbedded in SVG

Posted by Mark Claassen <ma...@donnell.com>.
At JavaOne I asked if images could be embedded in an SVG file, and I
understood that they could be.  Since then I have looked for more
information and found none.  I found the image tag, but the examples just
have links to other files, and not the encoded image.  If SVG can actaully
do this, are there examples anywhere?  Does Batik support this at this
point?

Thanks,
Mark
---------------------
Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203
South Bend, IN 46617
E-mail: mailto:mark.claassen@donnell.com
Voice: (219)232-3784
Fax: (219)232-4014



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