You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Huaxin <hx...@cs.ualberta.ca> on 2001/11/08 19:02:01 UTC

JSP to PDF

I am trying to use Strut, however, I am wondering if there
is a way to convert the OUTPUT of the JSP page to a
PDF format, so that the client side sees the PDF instead
of the translated HTML page?

thanx a lot



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Todd Wright <to...@jtconsilt.com>.
Tim,

You are correct that JSP is usually for HTML, but there is no reason it 
couldn't generate XML. In fact it it an ideal way to deliver semantic-rich 
data via a web-server.

Todd Wright

At 11:21 AM 12/12/2001 -0800, you wrote:
>I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML pages?!?
>
>You create your data content in XML.  Then create a separate document 
>style sheet
>using FO (Formatting Objects) markup.  These two documents will be then 
>converted
>into a PDF file using FOP.  FOP is one implementation of the FO specification.
>Other programs can convert the same FO style sheet document into other formats
>like Java AWT for example.
>
>The Java servlet can be used to auto-generate the XML.  Thus the data placed
>into the XML document can be extracted from other sources, like database
>servers through JDBC driver, CORBA servers (jacORB), messaging servers 
>(JBOSS),
>etc.
>
>On a last note, you can optionally create a style sheet for HTML as well.
>Thus
>you can use two style sheets, one for FO markup for things like PDF, SVG, 
>AWT, etc.,
>and one for HTML.
>
>The possibilities are limitless with XML....
>
>
>On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:
>
>>On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
>>
>>>Is it not possible to create a PDF-file from JSP?
>>>
>>>I believe I have heard something about FOP - you can get it from the 
>>>Apache /
>>>Jakarta website.
>>>
>>>/Lars Nielsen Lind
>>
>>
>>I don't know about using it from JSP, but I have a colleague who has used
>>FOP, and he loved it.  You basically have an XML document that describes the
>>layout using FOP tags, then it is processed and a PDF is produced.
>>
>>You could use the JSP to gather the information, but then I imagine you'd
>>want a servlet to handle it and process the FOP document, and then forward
>>to another JSP that offered a link to the resulting PDF.  Just my take on
>>it.
>>
>>I seem to recall that there was some commercial package involved in what he
>>was doing, but that may have been before the Jakarta project.  I don't know
>>for sure.
>>
>>Tim
>>
>>--
>>Tim McLaughlin
>>tim@macwebb.com
>>
>>
>>
>>--
>>To unsubscribe:   <ma...@jakarta.apache.org>
>>For additional commands: <ma...@jakarta.apache.org>
>>Troubles with the list: <ma...@jakarta.apache.org>
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Sylvain Hamel <Sy...@webnet.qc.ca>.
I think you misunderstand the basic mechanism that underlies either PHP or
ASP or JSP pages. The output is just plain text you can generate XML or HTML
or WML if you want. After all its only text. Tomcat can return whatever mime
type you want.

----- Original Message -----
From: "Darth Darknerd" <da...@realmspace.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, January 07, 2002 5:53 PM
Subject: Re: [tcusers]Re: JSP to PDF


> I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML
> pages?!?
>
> You create your data content in XML.  Then create a separate document
> style sheet
> using FO (Formatting Objects) markup.  These two documents will be then
> converted
> into a PDF file using FOP.  FOP is one implementation of the FO
> specification.
> Other programs can convert the same FO style sheet document into other
> formats
> like Java AWT for example.
>
> The Java servlet can be used to auto-generate the XML.  Thus the data
> placed
> into the XML document can be extracted from other sources, like database
> servers through JDBC driver, CORBA servers (jacORB), messaging servers
> (JBOSS),
> etc.
>
> On a last note, you can optionally create a style sheet for HTML as well.
> Thus
> you can use two style sheets, one for FO markup for things like PDF, SVG,
> AWT, etc.,
> and one for HTML.
>
> The possibilities are limitless with XML....
>
>
> On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:
>
> > On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
> >
> >> Is it not possible to create a PDF-file from JSP?
> >>
> >> I believe I have heard something about FOP - you can get it from the
> >> Apache /
> >> Jakarta website.
> >>
> >> /Lars Nielsen Lind
> >
> >
> > I don't know about using it from JSP, but I have a colleague who has
used
> > FOP, and he loved it.  You basically have an XML document that describes
> > the
> > layout using FOP tags, then it is processed and a PDF is produced.
> >
> > You could use the JSP to gather the information, but then I imagine
you'd
> > want a servlet to handle it and process the FOP document, and then
forward
> > to another JSP that offered a link to the resulting PDF.  Just my take
on
> > it.
> >
> > I seem to recall that there was some commercial package involved in what
> > he
> > was doing, but that may have been before the Jakarta project.  I don't
> > know
> > for sure.
> >
> > Tim
> >
> > --
> > Tim McLaughlin
> > tim@macwebb.com
> >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


SV: [tcusers]Re: JSP to PDF

Posted by Peter Thomsen <pe...@mail1.stofanet.dk>.
I Found this link at www.servlets.com it may be what you are looking for if
you do not want to use FOP.

<Snip from servlets.com>
A library for generating PDF files from a servlet. Useful if you want to
control exactly how your servlet's output will look. It requires JDK 1.2.

http://www.lowagie.com/iText/
</Snip>

Look at it and see if it is something you can use.

Peter Thomsen
-----Oprindelig meddelelse-----
Fra: Darth Darknerd [mailto:darknerd@realmspace.com]
Sendt: 7. januar 2002 23:54
Til: Tomcat Users List
Emne: Re: [tcusers]Re: JSP to PDF


I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML
pages?!?

You create your data content in XML.  Then create a separate document
style sheet
using FO (Formatting Objects) markup.  These two documents will be then
converted
into a PDF file using FOP.  FOP is one implementation of the FO
specification.
Other programs can convert the same FO style sheet document into other
formats
like Java AWT for example.

The Java servlet can be used to auto-generate the XML.  Thus the data
placed
into the XML document can be extracted from other sources, like database
servers through JDBC driver, CORBA servers (jacORB), messaging servers
(JBOSS),
etc.

On a last note, you can optionally create a style sheet for HTML as well.
Thus
you can use two style sheets, one for FO markup for things like PDF, SVG,
AWT, etc.,
and one for HTML.

The possibilities are limitless with XML....


On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:

> On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
>
>> Is it not possible to create a PDF-file from JSP?
>>
>> I believe I have heard something about FOP - you can get it from the
>> Apache /
>> Jakarta website.
>>
>> /Lars Nielsen Lind
>
>
> I don't know about using it from JSP, but I have a colleague who has used
> FOP, and he loved it.  You basically have an XML document that describes
> the
> layout using FOP tags, then it is processed and a PDF is produced.
>
> You could use the JSP to gather the information, but then I imagine you'd
> want a servlet to handle it and process the FOP document, and then forward
> to another JSP that offered a link to the resulting PDF.  Just my take on
> it.
>
> I seem to recall that there was some commercial package involved in what
> he
> was doing, but that may have been before the Jakarta project.  I don't
> know
> for sure.
>
> Tim
>
> --
> Tim McLaughlin
> tim@macwebb.com
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Darth Darknerd <da...@realmspace.com>.
I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML 
pages?!?

You create your data content in XML.  Then create a separate document 
style sheet
using FO (Formatting Objects) markup.  These two documents will be then 
converted
into a PDF file using FOP.  FOP is one implementation of the FO 
specification.
Other programs can convert the same FO style sheet document into other 
formats
like Java AWT for example.

The Java servlet can be used to auto-generate the XML.  Thus the data 
placed
into the XML document can be extracted from other sources, like database
servers through JDBC driver, CORBA servers (jacORB), messaging servers 
(JBOSS),
etc.

On a last note, you can optionally create a style sheet for HTML as well.  
Thus
you can use two style sheets, one for FO markup for things like PDF, SVG, 
AWT, etc.,
and one for HTML.

The possibilities are limitless with XML....


On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:

> On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
>
>> Is it not possible to create a PDF-file from JSP?
>>
>> I believe I have heard something about FOP - you can get it from the 
>> Apache /
>> Jakarta website.
>>
>> /Lars Nielsen Lind
>
>
> I don't know about using it from JSP, but I have a colleague who has used
> FOP, and he loved it.  You basically have an XML document that describes 
> the
> layout using FOP tags, then it is processed and a PDF is produced.
>
> You could use the JSP to gather the information, but then I imagine you'd
> want a servlet to handle it and process the FOP document, and then forward
> to another JSP that offered a link to the resulting PDF.  Just my take on
> it.
>
> I seem to recall that there was some commercial package involved in what 
> he
> was doing, but that may have been before the Jakarta project.  I don't 
> know
> for sure.
>
> Tim
>
> --
> Tim McLaughlin
> tim@macwebb.com
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Darth Darknerd <da...@realmspace.com>.
I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML 
pages?!?

You create your data content in XML.  Then create a separate document 
style sheet
using FO (Formatting Objects) markup.  These two documents will be then 
converted
into a PDF file using FOP.  FOP is one implementation of the FO 
specification.
Other programs can convert the same FO style sheet document into other 
formats
like Java AWT for example.

The Java servlet can be used to auto-generate the XML.  Thus the data 
placed
into the XML document can be extracted from other sources, like database
servers through JDBC driver, CORBA servers (jacORB), messaging servers 
(JBOSS),
etc.

On a last note, you can optionally create a style sheet for HTML as well.  
Thus
you can use two style sheets, one for FO markup for things like PDF, SVG, 
AWT, etc.,
and one for HTML.

The possibilities are limitless with XML....


On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:

> On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
>
>> Is it not possible to create a PDF-file from JSP?
>>
>> I believe I have heard something about FOP - you can get it from the 
>> Apache /
>> Jakarta website.
>>
>> /Lars Nielsen Lind
>
>
> I don't know about using it from JSP, but I have a colleague who has used
> FOP, and he loved it.  You basically have an XML document that describes 
> the
> layout using FOP tags, then it is processed and a PDF is produced.
>
> You could use the JSP to gather the information, but then I imagine you'd
> want a servlet to handle it and process the FOP document, and then forward
> to another JSP that offered a link to the resulting PDF.  Just my take on
> it.
>
> I seem to recall that there was some commercial package involved in what 
> he
> was doing, but that may have been before the Jakarta project.  I don't 
> know
> for sure.
>
> Tim
>
> --
> Tim McLaughlin
> tim@macwebb.com
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Darth Darknerd <da...@realmspace.com>.
I plead ignorance about JSP, but doesn't JSP make HTML pages, not XML 
pages?!?

You create your data content in XML.  Then create a separate document 
style sheet
using FO (Formatting Objects) markup.  These two documents will be then 
converted
into a PDF file using FOP.  FOP is one implementation of the FO 
specification.
Other programs can convert the same FO style sheet document into other 
formats
like Java AWT for example.

The Java servlet can be used to auto-generate the XML.  Thus the data 
placed
into the XML document can be extracted from other sources, like database
servers through JDBC driver, CORBA servers (jacORB), messaging servers 
(JBOSS),
etc.

On a last note, you can optionally create a style sheet for HTML as well.  
Thus
you can use two style sheets, one for FO markup for things like PDF, SVG, 
AWT, etc.,
and one for HTML.

The possibilities are limitless with XML....


On Friday, November 9, 2001, at 09:15  AM, Tim McLaughlin wrote:

> On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:
>
>> Is it not possible to create a PDF-file from JSP?
>>
>> I believe I have heard something about FOP - you can get it from the 
>> Apache /
>> Jakarta website.
>>
>> /Lars Nielsen Lind
>
>
> I don't know about using it from JSP, but I have a colleague who has used
> FOP, and he loved it.  You basically have an XML document that describes 
> the
> layout using FOP tags, then it is processed and a PDF is produced.
>
> You could use the JSP to gather the information, but then I imagine you'd
> want a servlet to handle it and process the FOP document, and then forward
> to another JSP that offered a link to the resulting PDF.  Just my take on
> it.
>
> I seem to recall that there was some commercial package involved in what 
> he
> was doing, but that may have been before the Jakarta project.  I don't 
> know
> for sure.
>
> Tim
>
> --
> Tim McLaughlin
> tim@macwebb.com
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: [tcusers]Re: JSP to PDF

Posted by Tim McLaughlin <ti...@macwebb.com>.
On 11/08/2001 23:07, "Lars Nielsen Lind" <mo...@worldonline.dk> wrote:

> Is it not possible to create a PDF-file from JSP?
> 
> I believe I have heard something about FOP - you can get it from the Apache /
> Jakarta website.
> 
> /Lars Nielsen Lind


I don't know about using it from JSP, but I have a colleague who has used
FOP, and he loved it.  You basically have an XML document that describes the
layout using FOP tags, then it is processed and a PDF is produced.

You could use the JSP to gather the information, but then I imagine you'd
want a servlet to handle it and process the FOP document, and then forward
to another JSP that offered a link to the resulting PDF.  Just my take on
it.

I seem to recall that there was some commercial package involved in what he
was doing, but that may have been before the Jakarta project.  I don't know
for sure.

Tim

--
Tim McLaughlin
tim@macwebb.com



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: AW: JSP to PDF

Posted by Huaxin <hx...@cs.ualberta.ca>.
I know this is technically doable, but is it practical?

say, how much time will be wasted on designing/debugging
the XSLT to transform your (bean) XML to Strut-based XHTML
(if you want MVC), especially when GUI layout is constantly
changing, which means you end up waste tons of time on
XSLT programming on GUI.


On Fri, 9 Nov 2001, Reto Badertscher wrote:

> Hello,
>
> With FOP it's possible to convert an XML to PDF. A good strategy for
> generating a document is first to create an XML structure of the document.
> >From there one can transform it in different target formats (HTML, XML for
> FOP) using XSL stylesheets.
>
> Regards
>
> Reto
>
> -----Urspr�ngliche Nachricht-----
> Von: Lars Nielsen Lind [mailto:moonie@worldonline.dk]
> Gesendet: Freitag, 9. November 2001 08:08
> An: Tomcat Users List
> Betreff: Re: JSP to PDF
>
>
> Is it not possible to create a PDF-file from JSP?
>
> I believe I have heard something about FOP - you can get it from the Apache
> / Jakarta website.
>
> /Lars Nielsen Lind
>
>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Friday, November 09, 2001 1:59 AM
> Subject: Re: JSP to PDF
>
>
> >
> >
> > On Thu, 8 Nov 2001, David Rault wrote:
> >
> > > Date: Thu, 8 Nov 2001 19:13:19 +0100
> > > From: David Rault <to...@free.fr>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: Re: JSP to PDF
> > >
> > > you can't make a pdf output from a jsp
> > > the reason is quite simple
> > >
> > > pdf is a binary format and JSPs can only generate text-based output
> > >
> > > wanna make pdf, write a servlet
> > > there must be an open source (maybe only LGPL) library to make pdfs
> > > somewhere, the name is lowagie something
> > >
> >
> > Another option would be to use a Filter (new in Servlet 2.3).  If you had
> > an HTML->PDF class library available, you could pretty easily do this --
> > either replacing the original "text/html" output, or writing a PDF copy to
> > a side file and still returning the HTML to the browser.
> >
> > > hope this helps
> > >
> > > David
> >
> > Craig McClanahan
> >
> >
> > > ----- Original Message -----
> > > From: "Huaxin" <hx...@cs.ualberta.ca>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Thursday, November 08, 2001 7:02 PM
> > > Subject: JSP to PDF
> > >
> > >
> > > > I am trying to use Strut, however, I am wondering if there
> > > > is a way to convert the OUTPUT of the JSP page to a
> > > > PDF format, so that the client side sees the PDF instead
> > > > of the translated HTML page?
> > > >
> > > > thanx a lot
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > > For additional commands: <ma...@jakarta.apache.org>
> > > > Troubles with the list: <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


AW: JSP to PDF

Posted by Reto Badertscher <rb...@i-netsystems.com>.
Hello,

With FOP it's possible to convert an XML to PDF. A good strategy for
generating a document is first to create an XML structure of the document.
>From there one can transform it in different target formats (HTML, XML for
FOP) using XSL stylesheets.

Regards

Reto

-----Ursprüngliche Nachricht-----
Von: Lars Nielsen Lind [mailto:moonie@worldonline.dk]
Gesendet: Freitag, 9. November 2001 08:08
An: Tomcat Users List
Betreff: Re: JSP to PDF


Is it not possible to create a PDF-file from JSP?

I believe I have heard something about FOP - you can get it from the Apache
/ Jakarta website.

/Lars Nielsen Lind


----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 1:59 AM
Subject: Re: JSP to PDF


>
>
> On Thu, 8 Nov 2001, David Rault wrote:
>
> > Date: Thu, 8 Nov 2001 19:13:19 +0100
> > From: David Rault <to...@free.fr>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Re: JSP to PDF
> >
> > you can't make a pdf output from a jsp
> > the reason is quite simple
> >
> > pdf is a binary format and JSPs can only generate text-based output
> >
> > wanna make pdf, write a servlet
> > there must be an open source (maybe only LGPL) library to make pdfs
> > somewhere, the name is lowagie something
> >
>
> Another option would be to use a Filter (new in Servlet 2.3).  If you had
> an HTML->PDF class library available, you could pretty easily do this --
> either replacing the original "text/html" output, or writing a PDF copy to
> a side file and still returning the HTML to the browser.
>
> > hope this helps
> >
> > David
>
> Craig McClanahan
>
>
> > ----- Original Message -----
> > From: "Huaxin" <hx...@cs.ualberta.ca>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 7:02 PM
> > Subject: JSP to PDF
> >
> >
> > > I am trying to use Strut, however, I am wondering if there
> > > is a way to convert the OUTPUT of the JSP page to a
> > > PDF format, so that the client side sees the PDF instead
> > > of the translated HTML page?
> > >
> > > thanx a lot
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 9 Nov 2001, Huaxin wrote:

> Date: Fri, 9 Nov 2001 09:07:49 -0700 (Mountain Standard Time)
> From: Huaxin <hx...@cs.ualberta.ca>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: JSP to PDF
>
> Yes, I know FOP. but the problem is
>
> 1. I want to reuse the GUI layout in JSP rather than
> writing XPATH for transforming XHTML to XSL:FO pages. that
> is too time consuming.
>
> 2. I am using Strut, the forms are nolonger static XHTML now,
> it is dynamic JSP output. I can't use html2pdf unless I can
> record the dynamic output to a HTML file.
>

See my response from yesterday -- use a Filter and you can capture the
output from *any* servlet or JSP page and convert it.  All you need is a
library that knows how to translate HTML into PDF.

Craig


> On Fri, 9 Nov 2001, Lars Nielsen Lind wrote:
>
> > Is it not possible to create a PDF-file from JSP?
> >
> > I believe I have heard something about FOP - you can get it from the Apache / Jakarta website.
> >
> > /Lars Nielsen Lind
> >
> >
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <cr...@apache.org>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Friday, November 09, 2001 1:59 AM
> > Subject: Re: JSP to PDF
> >
> >
> > >
> > >
> > > On Thu, 8 Nov 2001, David Rault wrote:
> > >
> > > > Date: Thu, 8 Nov 2001 19:13:19 +0100
> > > > From: David Rault <to...@free.fr>
> > > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > > Subject: Re: JSP to PDF
> > > >
> > > > you can't make a pdf output from a jsp
> > > > the reason is quite simple
> > > >
> > > > pdf is a binary format and JSPs can only generate text-based output
> > > >
> > > > wanna make pdf, write a servlet
> > > > there must be an open source (maybe only LGPL) library to make pdfs
> > > > somewhere, the name is lowagie something
> > > >
> > >
> > > Another option would be to use a Filter (new in Servlet 2.3).  If you had
> > > an HTML->PDF class library available, you could pretty easily do this --
> > > either replacing the original "text/html" output, or writing a PDF copy to
> > > a side file and still returning the HTML to the browser.
> > >
> > > > hope this helps
> > > >
> > > > David
> > >
> > > Craig McClanahan
> > >
> > >
> > > > ----- Original Message -----
> > > > From: "Huaxin" <hx...@cs.ualberta.ca>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > Sent: Thursday, November 08, 2001 7:02 PM
> > > > Subject: JSP to PDF
> > > >
> > > >
> > > > > I am trying to use Strut, however, I am wondering if there
> > > > > is a way to convert the OUTPUT of the JSP page to a
> > > > > PDF format, so that the client side sees the PDF instead
> > > > > of the translated HTML page?
> > > > >
> > > > > thanx a lot
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > > > For additional commands: <ma...@jakarta.apache.org>
> > > > > Troubles with the list: <ma...@jakarta.apache.org>
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > > For additional commands: <ma...@jakarta.apache.org>
> > > > Troubles with the list: <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by Huaxin <hx...@cs.ualberta.ca>.
Yes, I know FOP. but the problem is

1. I want to reuse the GUI layout in JSP rather than
writing XPATH for transforming XHTML to XSL:FO pages. that
is too time consuming.

2. I am using Strut, the forms are nolonger static XHTML now,
it is dynamic JSP output. I can't use html2pdf unless I can
record the dynamic output to a HTML file.

On Fri, 9 Nov 2001, Lars Nielsen Lind wrote:

> Is it not possible to create a PDF-file from JSP?
>
> I believe I have heard something about FOP - you can get it from the Apache / Jakarta website.
>
> /Lars Nielsen Lind
>
>
> ----- Original Message -----
> From: "Craig R. McClanahan" <cr...@apache.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Friday, November 09, 2001 1:59 AM
> Subject: Re: JSP to PDF
>
>
> >
> >
> > On Thu, 8 Nov 2001, David Rault wrote:
> >
> > > Date: Thu, 8 Nov 2001 19:13:19 +0100
> > > From: David Rault <to...@free.fr>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: Re: JSP to PDF
> > >
> > > you can't make a pdf output from a jsp
> > > the reason is quite simple
> > >
> > > pdf is a binary format and JSPs can only generate text-based output
> > >
> > > wanna make pdf, write a servlet
> > > there must be an open source (maybe only LGPL) library to make pdfs
> > > somewhere, the name is lowagie something
> > >
> >
> > Another option would be to use a Filter (new in Servlet 2.3).  If you had
> > an HTML->PDF class library available, you could pretty easily do this --
> > either replacing the original "text/html" output, or writing a PDF copy to
> > a side file and still returning the HTML to the browser.
> >
> > > hope this helps
> > >
> > > David
> >
> > Craig McClanahan
> >
> >
> > > ----- Original Message -----
> > > From: "Huaxin" <hx...@cs.ualberta.ca>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Thursday, November 08, 2001 7:02 PM
> > > Subject: JSP to PDF
> > >
> > >
> > > > I am trying to use Strut, however, I am wondering if there
> > > > is a way to convert the OUTPUT of the JSP page to a
> > > > PDF format, so that the client side sees the PDF instead
> > > > of the translated HTML page?
> > > >
> > > > thanx a lot
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > > For additional commands: <ma...@jakarta.apache.org>
> > > > Troubles with the list: <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by Lars Nielsen Lind <mo...@worldonline.dk>.
Is it not possible to create a PDF-file from JSP?

I believe I have heard something about FOP - you can get it from the Apache / Jakarta website.

/Lars Nielsen Lind


----- Original Message ----- 
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 1:59 AM
Subject: Re: JSP to PDF


> 
> 
> On Thu, 8 Nov 2001, David Rault wrote:
> 
> > Date: Thu, 8 Nov 2001 19:13:19 +0100
> > From: David Rault <to...@free.fr>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Re: JSP to PDF
> >
> > you can't make a pdf output from a jsp
> > the reason is quite simple
> >
> > pdf is a binary format and JSPs can only generate text-based output
> >
> > wanna make pdf, write a servlet
> > there must be an open source (maybe only LGPL) library to make pdfs
> > somewhere, the name is lowagie something
> >
> 
> Another option would be to use a Filter (new in Servlet 2.3).  If you had
> an HTML->PDF class library available, you could pretty easily do this --
> either replacing the original "text/html" output, or writing a PDF copy to
> a side file and still returning the HTML to the browser.
> 
> > hope this helps
> >
> > David
> 
> Craig McClanahan
> 
> 
> > ----- Original Message -----
> > From: "Huaxin" <hx...@cs.ualberta.ca>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 7:02 PM
> > Subject: JSP to PDF
> >
> >
> > > I am trying to use Strut, however, I am wondering if there
> > > is a way to convert the OUTPUT of the JSP page to a
> > > PDF format, so that the client side sees the PDF instead
> > > of the translated HTML page?
> > >
> > > thanx a lot
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 
> 
> 


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 8 Nov 2001, David Rault wrote:

> Date: Thu, 8 Nov 2001 19:13:19 +0100
> From: David Rault <to...@free.fr>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: JSP to PDF
>
> you can't make a pdf output from a jsp
> the reason is quite simple
>
> pdf is a binary format and JSPs can only generate text-based output
>
> wanna make pdf, write a servlet
> there must be an open source (maybe only LGPL) library to make pdfs
> somewhere, the name is lowagie something
>

Another option would be to use a Filter (new in Servlet 2.3).  If you had
an HTML->PDF class library available, you could pretty easily do this --
either replacing the original "text/html" output, or writing a PDF copy to
a side file and still returning the HTML to the browser.

> hope this helps
>
> David

Craig McClanahan


> ----- Original Message -----
> From: "Huaxin" <hx...@cs.ualberta.ca>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 7:02 PM
> Subject: JSP to PDF
>
>
> > I am trying to use Strut, however, I am wondering if there
> > is a way to convert the OUTPUT of the JSP page to a
> > PDF format, so that the client side sees the PDF instead
> > of the translated HTML page?
> >
> > thanx a lot
> >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP to PDF

Posted by Jim Urban <ji...@netsteps.net>.
We use servlets.  We give the user the option of viewing our generated
output in either HTML or PDF.  We use the MVC approach.  Our servlet
generates XML which, depending on how the user wishes to view the output, is
ran through Xalan with either an XSL:HTML XSL (for HTML) or an XSL:FO XSL
(for PDF) with the XSL:FO output ran through FOP (from Apache Java) for
conversion to PDF.  We then set the content type and return the final
output.

The neat thing about this approach is we are in a position to do anything
with our output, all we need is to apply the correct type of XSL style
sheet.

Jim

-----Original Message-----
From: David Rault [mailto:tomcat.drault@free.fr]
Sent: Thursday, November 08, 2001 12:13 PM
To: Tomcat Users List
Subject: Re: JSP to PDF


you can't make a pdf output from a jsp
the reason is quite simple

pdf is a binary format and JSPs can only generate text-based output

wanna make pdf, write a servlet
there must be an open source (maybe only LGPL) library to make pdfs
somewhere, the name is lowagie something

hope this helps

David
----- Original Message -----
From: "Huaxin" <hx...@cs.ualberta.ca>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 7:02 PM
Subject: JSP to PDF


> I am trying to use Strut, however, I am wondering if there
> is a way to convert the OUTPUT of the JSP page to a
> PDF format, so that the client side sees the PDF instead
> of the translated HTML page?
>
> thanx a lot
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by Huaxin <hx...@cs.ualberta.ca>.
Thanks for all of ur helpful replies in such a short time,

I am wondering if there is a way to reuse the GUI layout
in my JSP so that I don't need to worry about layout
in the PDF page?

On Thu, 8 Nov 2001, James Chuang wrote:

> David's answer was correct.  To do what you what to do, the receiver of the
> form input must be a servlet.  It then needs to use a PDF library to
> generate a PDF file.  Search for javapdf on Google to find a free use java
> to pdf library.  The library comes with an example on how to generate a PDF
> from a servlet.
>
> A web page and a PDF page are very different beasts.  On a web page, you
> don;t have to worry about things like margins, page size, page orientation,
> and page breaks, while those have to be dealt with in a PDF document.
>
>
> ----- Original Message -----
> From: "Huaxin" <hx...@cs.ualberta.ca>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 10:13 AM
> Subject: Re: JSP to PDF
>
>
> > No, I mean the OUTPUT of jsp to pdf, not from jsp to pdf.
> >
> > for example, a user has filled in form, and that after that
> > form is submitted, a PDF file will be generated for that
> > form filled in.  (with all those checkbox selected, textfield
> > filled, etc)
> >
> > On Thu, 8 Nov 2001, David Rault wrote:
> >
> > > you can't make a pdf output from a jsp
> > > the reason is quite simple
> > >
> > > pdf is a binary format and JSPs can only generate text-based output
> > >
> > > wanna make pdf, write a servlet
> > > there must be an open source (maybe only LGPL) library to make pdfs
> > > somewhere, the name is lowagie something
> > >
> > > hope this helps
> > >
> > > David
> > > ----- Original Message -----
> > > From: "Huaxin" <hx...@cs.ualberta.ca>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Thursday, November 08, 2001 7:02 PM
> > > Subject: JSP to PDF
> > >
> > >
> > > > I am trying to use Strut, however, I am wondering if there
> > > > is a way to convert the OUTPUT of the JSP page to a
> > > > PDF format, so that the client side sees the PDF instead
> > > > of the translated HTML page?
> > > >
> > > > thanx a lot
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > > For additional commands: <ma...@jakarta.apache.org>
> > > > Troubles with the list: <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by James Chuang <ja...@home.com>.
David's answer was correct.  To do what you what to do, the receiver of the
form input must be a servlet.  It then needs to use a PDF library to
generate a PDF file.  Search for javapdf on Google to find a free use java
to pdf library.  The library comes with an example on how to generate a PDF
from a servlet.

A web page and a PDF page are very different beasts.  On a web page, you
don;t have to worry about things like margins, page size, page orientation,
and page breaks, while those have to be dealt with in a PDF document.


----- Original Message -----
From: "Huaxin" <hx...@cs.ualberta.ca>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 10:13 AM
Subject: Re: JSP to PDF


> No, I mean the OUTPUT of jsp to pdf, not from jsp to pdf.
>
> for example, a user has filled in form, and that after that
> form is submitted, a PDF file will be generated for that
> form filled in.  (with all those checkbox selected, textfield
> filled, etc)
>
> On Thu, 8 Nov 2001, David Rault wrote:
>
> > you can't make a pdf output from a jsp
> > the reason is quite simple
> >
> > pdf is a binary format and JSPs can only generate text-based output
> >
> > wanna make pdf, write a servlet
> > there must be an open source (maybe only LGPL) library to make pdfs
> > somewhere, the name is lowagie something
> >
> > hope this helps
> >
> > David
> > ----- Original Message -----
> > From: "Huaxin" <hx...@cs.ualberta.ca>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 7:02 PM
> > Subject: JSP to PDF
> >
> >
> > > I am trying to use Strut, however, I am wondering if there
> > > is a way to convert the OUTPUT of the JSP page to a
> > > PDF format, so that the client side sees the PDF instead
> > > of the translated HTML page?
> > >
> > > thanx a lot
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by David Rault <to...@free.fr>.
then you target your form to a servlet
and in the servlet you set the response contenttype to application/x-pdf
get a servletOutputStream and start writing the pdf file
(try the lowagie library, worked fine when i tried it)

David

----- Original Message ----- 
From: "Huaxin" <hx...@cs.ualberta.ca>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 7:13 PM
Subject: Re: JSP to PDF


> No, I mean the OUTPUT of jsp to pdf, not from jsp to pdf.
> 
> for example, a user has filled in form, and that after that
> form is submitted, a PDF file will be generated for that
> form filled in.  (with all those checkbox selected, textfield
> filled, etc)
> 
> On Thu, 8 Nov 2001, David Rault wrote:
> 
> > you can't make a pdf output from a jsp
> > the reason is quite simple
> >
> > pdf is a binary format and JSPs can only generate text-based output
> >
> > wanna make pdf, write a servlet
> > there must be an open source (maybe only LGPL) library to make pdfs
> > somewhere, the name is lowagie something
> >
> > hope this helps
> >
> > David
> > ----- Original Message -----
> > From: "Huaxin" <hx...@cs.ualberta.ca>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 7:02 PM
> > Subject: JSP to PDF
> >
> >
> > > I am trying to use Strut, however, I am wondering if there
> > > is a way to convert the OUTPUT of the JSP page to a
> > > PDF format, so that the client side sees the PDF instead
> > > of the translated HTML page?
> > >
> > > thanx a lot
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by Huaxin <hx...@cs.ualberta.ca>.
No, I mean the OUTPUT of jsp to pdf, not from jsp to pdf.

for example, a user has filled in form, and that after that
form is submitted, a PDF file will be generated for that
form filled in.  (with all those checkbox selected, textfield
filled, etc)

On Thu, 8 Nov 2001, David Rault wrote:

> you can't make a pdf output from a jsp
> the reason is quite simple
>
> pdf is a binary format and JSPs can only generate text-based output
>
> wanna make pdf, write a servlet
> there must be an open source (maybe only LGPL) library to make pdfs
> somewhere, the name is lowagie something
>
> hope this helps
>
> David
> ----- Original Message -----
> From: "Huaxin" <hx...@cs.ualberta.ca>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 7:02 PM
> Subject: JSP to PDF
>
>
> > I am trying to use Strut, however, I am wondering if there
> > is a way to convert the OUTPUT of the JSP page to a
> > PDF format, so that the client side sees the PDF instead
> > of the translated HTML page?
> >
> > thanx a lot
> >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by David Rault <to...@free.fr>.
you can't make a pdf output from a jsp
the reason is quite simple

pdf is a binary format and JSPs can only generate text-based output

wanna make pdf, write a servlet
there must be an open source (maybe only LGPL) library to make pdfs
somewhere, the name is lowagie something

hope this helps

David
----- Original Message -----
From: "Huaxin" <hx...@cs.ualberta.ca>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 7:02 PM
Subject: JSP to PDF


> I am trying to use Strut, however, I am wondering if there
> is a way to convert the OUTPUT of the JSP page to a
> PDF format, so that the client side sees the PDF instead
> of the translated HTML page?
>
> thanx a lot
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP to PDF

Posted by Barry White <ba...@charter.net>.
I found an article on the subject here
http://javaboutique.internet.com/resources/books/jcb/jcb3-1.html

Hope this helps,
Barry

----- Original Message ----- 
From: "Huaxin" <hx...@cs.ualberta.ca>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 1:02 PM
Subject: JSP to PDF


> I am trying to use Strut, however, I am wondering if there
> is a way to convert the OUTPUT of the JSP page to a
> PDF format, so that the client side sees the PDF instead
> of the translated HTML page?
> 
> thanx a lot
> 
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>