You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim McLaughlin <ti...@macwebb.com> on 2001/11/09 18:15:10 UTC

Re: [tcusers]Re: JSP to PDF

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: [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>