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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to