You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Magne Skjeret <ma...@broadpark.no> on 2003/09/24 19:32:14 UTC
pdf generating
Hi
I have got some requirements to create pdf of my html on my webapp. The
html is not static and will change from what the user requests.
I have looked into fop, and it seems to be more than suitable for me.
I was wondering if anyone has used velocity templates to generate xml,
and run it through fop and get pdf.
The pdf needs some information from the java classes, so I need a
templating that can call java objects. So in that matter velocity is
perfect for me.
Is it possible to get the output stream from a template, either read it
in or flush it to a file?
Or are there more suitable ways to accomplish such a task?
Magne
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: pdf generating
Posted by Magne Skjeret <ma...@broadpark.no>.
ons, 24.09.2003 kl. 19.32 skrev Magne Skjeret:
I think maybe running like app_example1 in the distribution, taking the
stream and do whatever I want with it. Running it throught fop, hssf or
some other tool of choice.
Just ensuring that the output is correct xml/xhtml.
Magne
> Hi
>
> I have got some requirements to create pdf of my html on my webapp. The
> html is not static and will change from what the user requests.
>
> I have looked into fop, and it seems to be more than suitable for me.
>
> I was wondering if anyone has used velocity templates to generate xml,
> and run it through fop and get pdf.
>
> The pdf needs some information from the java classes, so I need a
> templating that can call java objects. So in that matter velocity is
> perfect for me.
>
> Is it possible to get the output stream from a template, either read it
> in or flush it to a file?
>
> Or are there more suitable ways to accomplish such a task?
>
> Magne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
Re: pdf generating
Posted by Dave Newton <da...@solaraccess.com>.
On Wed, 2003-09-24 at 14:02, Magne Skjeret wrote:
> Well, I have up to now only used it from a servlet, letting the
> servlet do with the output stream what it needs to do.
Oh, okay; now I understand :) For a brief, shining moment I thought I
was doing something brilliant and just didn't know it ;)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: pdf generating
Posted by Dave Newton <da...@solaraccess.com>.
On Wed, 2003-09-24 at 14:02, Magne Skjeret wrote:
> Well, I have up to now only used it from a servlet, letting the
> servlet do with the output stream what it needs to do.
Oh, okay; now I understand :) For a brief, shining moment I thought I
was doing something brilliant and just didn't know it ;)
Dave
Re: pdf generating
Posted by Magne Skjeret <ma...@broadpark.no>.
ons, 24.09.2003 kl. 19.59 skrev Dave Newton:
> On Wed, 2003-09-24 at 13:32, Magne Skjeret wrote:
> > Is it possible to get the output stream from a template, either read it
> > in or flush it to a file?
>
> As opposed to what? I'm always (in my applications) generating an output
> file or a String that I can do whatever I want with.
Well, I have up to now only used it from a servlet, letting the
servlet do with the output stream what it needs to do.
But I think running it as app_example1 should do what I need.
Magne
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: pdf generating
Posted by Magne Skjeret <ma...@broadpark.no>.
ons, 24.09.2003 kl. 19.59 skrev Dave Newton:
> On Wed, 2003-09-24 at 13:32, Magne Skjeret wrote:
> > Is it possible to get the output stream from a template, either read it
> > in or flush it to a file?
>
> As opposed to what? I'm always (in my applications) generating an output
> file or a String that I can do whatever I want with.
Well, I have up to now only used it from a servlet, letting the
servlet do with the output stream what it needs to do.
But I think running it as app_example1 should do what I need.
Magne
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
Re: pdf generating
Posted by Dave Newton <da...@solaraccess.com>.
On Wed, 2003-09-24 at 13:32, Magne Skjeret wrote:
> Is it possible to get the output stream from a template, either read it
> in or flush it to a file?
As opposed to what? I'm always (in my applications) generating an output
file or a String that I can do whatever I want with.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: pdf generating
Posted by Magne Skjeret <ma...@broadpark.no>.
ons, 24.09.2003 kl. 19.32 skrev Magne Skjeret:
I think maybe running like app_example1 in the distribution, taking the
stream and do whatever I want with it. Running it throught fop, hssf or
some other tool of choice.
Just ensuring that the output is correct xml/xhtml.
Magne
> Hi
>
> I have got some requirements to create pdf of my html on my webapp. The
> html is not static and will change from what the user requests.
>
> I have looked into fop, and it seems to be more than suitable for me.
>
> I was wondering if anyone has used velocity templates to generate xml,
> and run it through fop and get pdf.
>
> The pdf needs some information from the java classes, so I need a
> templating that can call java objects. So in that matter velocity is
> perfect for me.
>
> Is it possible to get the output stream from a template, either read it
> in or flush it to a file?
>
> Or are there more suitable ways to accomplish such a task?
>
> Magne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: pdf generating
Posted by Dave Newton <da...@solaraccess.com>.
On Wed, 2003-09-24 at 13:32, Magne Skjeret wrote:
> Is it possible to get the output stream from a template, either read it
> in or flush it to a file?
As opposed to what? I'm always (in my applications) generating an output
file or a String that I can do whatever I want with.
Dave