Please take a look at the embedding examples:
http://xmlgraphics.apache.org/fop/0.95/embedding.html#examples

They give you hints on how to implement the process in the most
efficient way.

It's bad practice to generate XSL-FO directly in code. It's messy and
hard to maintain. If you just send the participant data to a SAX stream
(define your own basic XML format with just the participant data, no
layout), you can separate out the layout logic into an XSLT stylesheet
that will take your XML format and turn it into XSL-FO. That keeps your
Java code clean and allows you to more quickly change layout stuff if
you need to. It also has the added benefit that you can do something
else with the XML data. For example, another XSLT stylesheet could turn
your participant data into HTML. The generation of the participant data
is practically equivalent to the ExampleObj2XML on the page indicated
above.

If you stay on the SAX level, you can avoid building up the full
participant document in memory. FOP will rather process the content as
it comes in as individual calls to the SAX ContentHandler.

If you can put each participant in a separate page-sequence you'll allow
FOP to run at very little memory usage. You can basically generate an
unlimited number of pages that way. Each participant is automatically
"flushed" to the PDF file that way.

I hope that helps.

On 11.09.2008 17:13:32 Venkatesan, Balaji wrote:
> > Hi,
> I have just started using FOP. I have a requirement to write a pdf file
> with more than 1000 pages.How can I do that? I am directly creating a
> XSL-FO string to create a pdf document and concatenating that into a big
> string, I know it wrong, Is there any other way?. Basically, we generate
> documents for multiple participants at the same time and write all their
> data into a single pdf file. Here is an example:
> 
> > The data comes in this order :    participant1, participant2,
> > participant3, participant4, participant5 ..... Participant1000
> > 
> > As soon as I am done with the first participant, I have to write his
> > data into a pdf file and process the second participant and write his
> > data to the same pdf file and so on.
> > 
> > How do I do this more effectively??? 
> > 
> > Advanced thanks for your help.
> > 
> > -B




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to