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 Doug Schepers <do...@schepers.cc> on 2003/09/23 17:08:31 UTC

Saving To a File

Hi, Batik newbie question-

I find myself wanting to save content generated within some of my
SVG+JavaScript apps. On Windows/IE, this is not a problem... I can use the
FileSystemObject. But for Linux and Mac, this is not an option.

Is it possible to create a Batik distribution to allow me to save a file
locally (or, less desirably, to append to an existing file)? Has this
already been done?

Thanks-
-Doug



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


Re: Saving To a File

Posted by Tonny Kohar <to...@kiyut.com>.
hi,

I don't know much about javascript.
But you can do something like this:
1) as long as you can obtain SVG DOM you could sent it back to server
2) from the server side(servlet,jsp,cgi,php,asp,etc) you can email back
to the user or display it on browser

On Wed, 2003-09-24 at 04:02, Thomas DeWeese wrote:
> Doug Schepers wrote:
> 
> > Thanks for the quick reply. I had found that, and suspected it might be
> > relevant, but wasn't sure how to use it. I haven't coded in Java for quite
> > some time. Has anyone got a pointer on where to start to make a build that,
> > say, saves a file when postURL is called, and opens one for getURL? I'd be
> > very grateful if anyone has such a framework lying around.
> 
>    Well I wouldn't abuse get/postURL like that.  As it turns out Rhino the
> JavaScript implementation we use allows you to directly import classes/packages
> into your JavaScript.
> 
> This is done like this:
> 
> importPackage(java.awt);
> frame = new Frame("JavaScript"); // Create a Java awt Frame.
> 
>     This gives you access to all the Java.io classes and what not.
> 
> For more information on this take a look at:
>    http://www.mozilla.org/rhino/scriptjava.html
> 
> > Also, can this be used to "discover" files with a particular extension, or
> > will I need to know the names of the files beforehand?
> 
>     With Java you can read the contents of directories etc...
> 
> 
> > Many thanks-
> > -Doug
> > 
> > 
> > Tonny Kohar wrote:
> > 
> > 
> > 
> >>hi
> >>
> >>you can use SVGTranscoder provided by batik
> >>
> >>Regards
> >>Tonny kohar
> >>http://www.kiyut.com
> >>
> >>On Tue, 2003-09-23 at 22:08, Doug Schepers wrote:
> >>
> >>>Hi, Batik newbie question-
> >>>
> >>>I find myself wanting to save content generated within some of my
> >>>SVG+JavaScript apps. On Windows/IE, this is not a problem... I can use
> > 
> > the
> > 
> >>>FileSystemObject. But for Linux and Mac, this is not an option.
> >>>
> >>>Is it possible to create a Batik distribution to allow me to save a file
> >>>locally (or, less desirably, to append to an existing file)? Has this
> >>>already been done?
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Saving To a File

Posted by Thomas DeWeese <Th...@Kodak.com>.
Doug Schepers wrote:

> Thanks for the quick reply. I had found that, and suspected it might be
> relevant, but wasn't sure how to use it. I haven't coded in Java for quite
> some time. Has anyone got a pointer on where to start to make a build that,
> say, saves a file when postURL is called, and opens one for getURL? I'd be
> very grateful if anyone has such a framework lying around.

   Well I wouldn't abuse get/postURL like that.  As it turns out Rhino the
JavaScript implementation we use allows you to directly import classes/packages
into your JavaScript.

This is done like this:

importPackage(java.awt);
frame = new Frame("JavaScript"); // Create a Java awt Frame.

    This gives you access to all the Java.io classes and what not.

For more information on this take a look at:
   http://www.mozilla.org/rhino/scriptjava.html

> Also, can this be used to "discover" files with a particular extension, or
> will I need to know the names of the files beforehand?

    With Java you can read the contents of directories etc...


> Many thanks-
> -Doug
> 
> 
> Tonny Kohar wrote:
> 
> 
> 
>>hi
>>
>>you can use SVGTranscoder provided by batik
>>
>>Regards
>>Tonny kohar
>>http://www.kiyut.com
>>
>>On Tue, 2003-09-23 at 22:08, Doug Schepers wrote:
>>
>>>Hi, Batik newbie question-
>>>
>>>I find myself wanting to save content generated within some of my
>>>SVG+JavaScript apps. On Windows/IE, this is not a problem... I can use
> 
> the
> 
>>>FileSystemObject. But for Linux and Mac, this is not an option.
>>>
>>>Is it possible to create a Batik distribution to allow me to save a file
>>>locally (or, less desirably, to append to an existing file)? Has this
>>>already been done?




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


Re: Saving To a File

Posted by Doug Schepers <do...@schepers.cc>.
Hi, Tonny -

Thanks for the quick reply. I had found that, and suspected it might be
relevant, but wasn't sure how to use it. I haven't coded in Java for quite
some time. Has anyone got a pointer on where to start to make a build that,
say, saves a file when postURL is called, and opens one for getURL? I'd be
very grateful if anyone has such a framework lying around.

Also, can this be used to "discover" files with a particular extension, or
will I need to know the names of the files beforehand?

Many thanks-
-Doug


Tonny Kohar wrote:


> hi
>
> you can use SVGTranscoder provided by batik
>
> Regards
> Tonny kohar
> http://www.kiyut.com
>
> On Tue, 2003-09-23 at 22:08, Doug Schepers wrote:
> > Hi, Batik newbie question-
> >
> > I find myself wanting to save content generated within some of my
> > SVG+JavaScript apps. On Windows/IE, this is not a problem... I can use
the
> > FileSystemObject. But for Linux and Mac, this is not an option.
> >
> > Is it possible to create a Batik distribution to allow me to save a file
> > locally (or, less desirably, to append to an existing file)? Has this
> > already been done?
> >
> > Thanks-
> > -Doug
> >



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


Re: Saving To a File

Posted by Tonny Kohar <to...@kiyut.com>.
hi

you can use SVGTranscoder provided by batik

Regards
Tonny kohar
http://www.kiyut.com

On Tue, 2003-09-23 at 22:08, Doug Schepers wrote:
> Hi, Batik newbie question-
> 
> I find myself wanting to save content generated within some of my
> SVG+JavaScript apps. On Windows/IE, this is not a problem... I can use the
> FileSystemObject. But for Linux and Mac, this is not an option.
> 
> Is it possible to create a Batik distribution to allow me to save a file
> locally (or, less desirably, to append to an existing file)? Has this
> already been done?
> 
> Thanks-
> -Doug
> 
> 
> 
> ---------------------------------------------------------------------
> 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