You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Fabio Biscaro <bi...@webscience.it> on 2003/12/01 13:01:36 UTC

R: Images

Can you give me a sample to allow batik load jar files?

Thanks!

Fabio

-----Messaggio originale-----
Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
Inviato: venerdì 28 novembre 2003 13.44
A: Batik Users
Oggetto: Re: Images


Fabio Biscaro wrote:

> Hi! I would like to know if someone knows a way, using batik, to pack 
> all files used by an svg document in a zip file or similar.

    Batik should support the 'jar' file Protocol.

> For example: svg loads some images and javascript files. Now I use to 
> put all files in subdir. Can I make a single zip file of everything?

    You can make a jar file (close to a zip) and use the jar protocol to
access the files.




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


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


Re: R: R: Images

Posted by Thomas DeWeese <Th...@Kodak.com>.
Fabio Biscaro wrote:

> Can I use this protocol for images in svg too?

   Yes.

> How should i change xlink:href attribute to load images in jar?

    I would suggest putting the document and all the images in the
jar file.  Then you can just use relative URL's and it will just
work (your files can be in the same directory tree either just
on disk or in the jar file).

For example if the SVG has:

    <image xlink:href="buttons/foo.png" .../>

if the svg document comes from:  file:/tmp/foo.svg

  Batik will look for the image in:

     file:/tmp/buttons/foo.png

If the svg document comes from:

    jar:http://example.org/foo.png

Batik will look for the image in:

    jar:http://example.org/buttons/foo.png


> -----Messaggio originale-----
> Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
> Inviato: lunedì 1 dicembre 2003 13.31
> A: Batik Users
> Oggetto: Re: R: Images
> 
> 
> Fabio Biscaro wrote:
> 
> 
>>Can you give me a sample to allow batik load jar files?
> 
> 
>     The format of a jar URL is:
> 
>   jar:<URL for jar file>!<path in jar file>
> 
> Example:
> 
>     jar:http://www.example.org/some/jarfile.jar!samples/image.svg
> 
>     Yes it looks a little weird with the two protocols but it should
> work.
> 
> 
>>Thanks!
>>
>>Fabio
>>
>>-----Messaggio originale-----
>>Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com]
>>Inviato: venerdì 28 novembre 2003 13.44
>>A: Batik Users
>>Oggetto: Re: Images
>>
>>
>>Fabio Biscaro wrote:
>>
>>
>>
>>>Hi! I would like to know if someone knows a way, using batik, to pack
>>>all files used by an svg document in a zip file or similar.
>>
>>
>>    Batik should support the 'jar' file Protocol.
>>
>>
>>
>>>For example: svg loads some images and javascript files. Now I use to
>>>put all files in subdir. Can I make a single zip file of everything?
>>
>>
>>    You can make a jar file (close to a zip) and use the jar protocol 
>>to access the files.
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>
>>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




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


R: R: Images

Posted by Fabio Biscaro <bi...@webscience.it>.
Can I use this protocol for images in svg too?

How should i change xlink:href attribute to load images in jar?

Thanks,
Fabio

-----Messaggio originale-----
Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
Inviato: lunedì 1 dicembre 2003 13.31
A: Batik Users
Oggetto: Re: R: Images


Fabio Biscaro wrote:

> Can you give me a sample to allow batik load jar files?

    The format of a jar URL is:

  jar:<URL for jar file>!<path in jar file>

Example:

    jar:http://www.example.org/some/jarfile.jar!samples/image.svg

    Yes it looks a little weird with the two protocols but it should
work.

> 
> Thanks!
> 
> Fabio
> 
> -----Messaggio originale-----
> Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com]
> Inviato: venerdì 28 novembre 2003 13.44
> A: Batik Users
> Oggetto: Re: Images
> 
> 
> Fabio Biscaro wrote:
> 
> 
>>Hi! I would like to know if someone knows a way, using batik, to pack
>>all files used by an svg document in a zip file or similar.
> 
> 
>     Batik should support the 'jar' file Protocol.
> 
> 
>>For example: svg loads some images and javascript files. Now I use to
>>put all files in subdir. Can I make a single zip file of everything?
> 
> 
>     You can make a jar file (close to a zip) and use the jar protocol 
> to access the files.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




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


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


Re: R: Images

Posted by Thomas DeWeese <Th...@Kodak.com>.
Fabio Biscaro wrote:

> Can you give me a sample to allow batik load jar files?

    The format of a jar URL is:

  jar:<URL for jar file>!<path in jar file>

Example:

    jar:http://www.example.org/some/jarfile.jar!samples/image.svg

    Yes it looks a little weird with the two protocols but it should
work.

> 
> Thanks!
> 
> Fabio
> 
> -----Messaggio originale-----
> Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
> Inviato: venerdì 28 novembre 2003 13.44
> A: Batik Users
> Oggetto: Re: Images
> 
> 
> Fabio Biscaro wrote:
> 
> 
>>Hi! I would like to know if someone knows a way, using batik, to pack 
>>all files used by an svg document in a zip file or similar.
> 
> 
>     Batik should support the 'jar' file Protocol.
> 
> 
>>For example: svg loads some images and javascript files. Now I use to 
>>put all files in subdir. Can I make a single zip file of everything?
> 
> 
>     You can make a jar file (close to a zip) and use the jar protocol to
> access the files.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




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