You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Aaron Optimizer Digulla <di...@hepe.com> on 2001/02/09 10:22:35 UTC

Re: [fop-dev] Re: generate pdf from link in xml/html document

On Fri, Feb 09, 2001 at 01:02:58AM -0800, Olivier Eymere wrote:

> > When you generate the HTML from the XML file, do another run of your XSLT
> > processor with a different stylesheet that produces XSL FO which you can
> > then convert into a PDF file with FOP. Then you can upload both the
> > HTML and the PDF to the web server :-)
> I was hoping to generate the pdf on demand.  Most users will be happy
> just to view the html but sometimes a user will want to save a pdf for
> viewing later.  For example to keep on their laptop to read on the
> road.  Generating a pdf everytime would be unnecesary load.

Depends on the size of the xml file. My files take several minutes
to render (5-15), so that's not an option for me.

> I have all the stylesheets ready to go.  I want to have a link to create
> the pdf when a user requests one.

There have been some posts here about using FOP as a servlet. Maybe you find
something useful in there. Try http://marc.theaimsgroup.com/ for an
archive.

-- 
==============================================
Sowatec AG,       CH-8330 Pfäffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, digulla@sowatec.com
==============================================

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: [fop-dev] Re: generate pdf from link in xml/html document

Posted by Scott Jones <sc...@on-sitemanager.com>.
You should check out Cocoon at http://xml.apache.org/cocoon.  The current
version (Cocoon 1.8.2) supports FOP 0.15 (I believe, but not the latest FOP
releases).  The beauty of this "Java Publishing Framework" is that it can
compile your XML->PDF transformation into a chain of what they call
"producers" so that your PDF may be dynamically generated on demand very
quickly.

My application creates dynamic PDF files that are up to 20 pages in length
within a few tenths of a second (after the first request when the page
compiles).  The cocoon distribution comes with a copy of FOP already
installed, and they have several examples of how it can be used.  :)

Check it out; you'll like it!

-Scott

----- Original Message -----
From: "Aaron Optimizer Digulla" <di...@hepe.com>
To: <fo...@xml.apache.org>
Sent: Friday, February 09, 2001 1:22 AM
Subject: Re: [fop-dev] Re: generate pdf from link in xml/html document


> On Fri, Feb 09, 2001 at 01:02:58AM -0800, Olivier Eymere wrote:
>
> > > When you generate the HTML from the XML file, do another run of your
XSLT
> > > processor with a different stylesheet that produces XSL FO which you
can
> > > then convert into a PDF file with FOP. Then you can upload both the
> > > HTML and the PDF to the web server :-)
> > I was hoping to generate the pdf on demand.  Most users will be happy
> > just to view the html but sometimes a user will want to save a pdf for
> > viewing later.  For example to keep on their laptop to read on the
> > road.  Generating a pdf everytime would be unnecesary load.
>
> Depends on the size of the xml file. My files take several minutes
> to render (5-15), so that's not an option for me.
>
> > I have all the stylesheets ready to go.  I want to have a link to create
> > the pdf when a user requests one.
>
> There have been some posts here about using FOP as a servlet. Maybe you
find
> something useful in there. Try http://marc.theaimsgroup.com/ for an
> archive.
>
> --
> ==============================================
> Sowatec AG,       CH-8330 Pfäffikon (ZH)
> Witzbergstr. 7,   http://www.sowatec.com
> Tel: +41-(0)1-952 55 55
> Fax: +41-(0)1-952 55 66
> ----------------------------------------------
> Aaron "Optimizer" Digulla, digulla@sowatec.com
> ==============================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org