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 Alvin Tan <al...@patroids.com> on 2000/09/05 06:39:00 UTC

How to speed up the generating of PDF

Hi,

I need advice or help in speeding up the process of generate PDF. I have 26
xml files and each has its own xsl file. In my program I generate 26 FO
files using the xml and its xsl. After that I generate 26 PDF files and then
merge all 26 PDF files into one PDF file. This process takes me about 5
minutes if there are low resolution image in every PDF file and about 9
minutes if I'm using high resolution image. Any way I can speed up the
process? Any help is greatly appreciated. Thank you.


Regards,
Alvin


Re: How to speed up the generating of PDF

Posted by Fotis Jannidis <fo...@lrz.uni-muenchen.de>.
> In article <FJ...@patroids.com>,
> "Alvin Tan" <al...@patroids.com> wrote:
> 
> >This is how I generate the FO:
> >java org.apache.xalan.xslt.Process -IN file1.xml -XSL file1.xsl -OUT
> >file1.fo
> >
> >And this is how I generate the PDF:
> >java org.apache.fop.apps.CommandLine file1.fo file1.pdf
> >
> >Is there any better way?

From:           	d96-mst-ingen-reklam@d.kth.se (Mikael St?ldal)
 
> Yes. Write a small Java app which invokes Xalan and redirect its output
> as SAX or DOM directly to FOP. Then the FO data doesn't have to be
> serialized and written to disk.

You can also use XalanCommandLine as described in the docs 
which calls first Xalan and then Fop.

hth,
Fotis

Re: How to speed up the generating of PDF

Posted by Mikael St�ldal <d9...@d.kth.se>.
In article <FJ...@patroids.com>,
"Alvin Tan" <al...@patroids.com> wrote:

>This is how I generate the FO:
>java org.apache.xalan.xslt.Process -IN file1.xml -XSL file1.xsl -OUT
>file1.fo
>
>And this is how I generate the PDF:
>java org.apache.fop.apps.CommandLine file1.fo file1.pdf
>
>Is there any better way?

Yes. Write a small Java app which invokes Xalan and redirect its output
as SAX or DOM directly to FOP. Then the FO data doesn't have to be
serialized and written to disk.

-- 
/****************************************************************\
* You have just read a message from Mikael Ståldal.              *
*                                                                *
* Remove "-ingen-reklam" from the address before mail replying.  *
\****************************************************************/

RE: How to speed up the generating of PDF

Posted by Alvin Tan <al...@patroids.com>.
This is how I generate the FO:
java org.apache.xalan.xslt.Process -IN file1.xml -XSL file1.xsl -OUT
file1.fo

And this is how I generate the PDF:
java org.apache.fop.apps.CommandLine file1.fo file1.pdf

Is there any better way?


Alvin

-----Original Message-----
From: Mikael Ståldal [mailto:d96-mst-ingen-reklam@d.kth.se]
Sent: Wednesday, September 06, 2000 4:15 AM
To: fop-dev@xml.apache.org
Subject: Re: How to speed up the generating of PDF


In article <FJ...@patroids.com>,
"Alvin Tan" <al...@patroids.com> wrote:

>I need advice or help in speeding up the process of generate PDF. I have 26
>xml files and each has its own xsl file. In my program I generate 26 FO
>files using the xml and its xsl. After that I generate 26 PDF files and
then
>merge all 26 PDF files into one PDF file.

Do you write the FO data into a file which is then read (and parsed) by
FOP? It might be faster if you let the XSLT processor send its output
directly to FOP using SAX or DOM.



Re: How to speed up the generating of PDF

Posted by Mikael St�ldal <d9...@d.kth.se>.
In article <FJ...@patroids.com>,
"Alvin Tan" <al...@patroids.com> wrote:

>I need advice or help in speeding up the process of generate PDF. I have 26
>xml files and each has its own xsl file. In my program I generate 26 FO
>files using the xml and its xsl. After that I generate 26 PDF files and then
>merge all 26 PDF files into one PDF file.

Do you write the FO data into a file which is then read (and parsed) by
FOP? It might be faster if you let the XSLT processor send its output
directly to FOP using SAX or DOM.

-- 
/****************************************************************\
* You have just read a message from Mikael Ståldal.              *
*                                                                *
* Remove "-ingen-reklam" from the address before mail replying.  *
\****************************************************************/