You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Darth Darknerd <da...@realmspace.com> on 2001/12/12 20:21:19 UTC
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>
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>