You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Venkatesan, Balaji" <Ba...@us.ing.com> on 2008/09/11 17:13:32 UTC

Need help in writing pdf with more than 1000 pages using fop..

> 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

Re: Need help in writing pdf with more than 1000 pages using fop..

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Actually, for me, that's even another reason for using XSLT. But in the
end, you have to live with your solution.

On 11.09.2008 17:45:05 Venkatesan, Balaji wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Thanks.
> 
> But the pdf document we create is NOT of the same style everytime, we
> are creating documents of different look and feel (but all are pdf)
> depending on the document name for a participant. Actually, I missed out
> our data style. It should be:
> 
> Participant1 	DocumentA		Client1	Plan11
> Participant2 	DocumentB		Client1	Plan11
> Participant3 	DocumentC		Client2	Plan21
> Participant4 	DocumentA		Client2	Plan21
> .....
> .... and so on. Eventhough Participant1 and 4 are using the same document
> name, since they are under different client, their document definition
> may be entirely/slightly different.
> 
> I don't think we can have one common StyleSheet to print pdf for all
> types of documents and that is why I am directly creating XSL-FO. 
> 
> Thanks
> balaji
> 
> ===================================
> Balaji Venkatesan
> *617-376-9257
> *balaji.venkatesan@us.ing.com
> ING. Your future. Made easier.SM
> ===================================
> 
> - -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Sent: Thursday, September 11, 2008 11:34 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Need help in writing pdf with more than 1000 pages using
> fop..
> 
> 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: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Universal 2.8.3
> Charset: us-ascii
> 
> wsBVAwUBSMk9AVIHx0ARICbPAQjwRQf/cEEvNSQip5nDGEIc2H0oUZA1Qg+ZT/wm
> 110OwDJIY3zpi8b4BK3V/4HSC8+wFxiPPaXEnVevpOUM65hR6826fpRRuHGP7j0f
> CQVdWH4yfwTrLkMabu4jtQCOybLHhEUo+uU5kYg4OZWbDKuw4t14gamo7FrJ1jft
> gdUaDGmIKauf68XXnSW/GtUNcZaxHsT35Cq09+aVxBosbdoeCuDmk0HSvyqdUfEE
> ljx+gPCzxt6Sxdg3izsj4baQCDH3iR7m9PXrzgP5QFwY1myZO+9XPKij+I/0UQKT
> 9T/HLtphntXmTQ/Qi5TQRm2/H+XC24h3k5s0Om//ZfmwcNMkut4M7g==
> =BvnA
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------
> 
> NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients.  If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited.  If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.
> 
> ============================================================================================
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Need help in writing pdf with more than 1000 pages using fop..

Posted by Joerg von Frantzius <jo...@artnology.com>.
What I meant was to create a common XML format for the contents (i.e.
defined by an XSD), independent of how contents are supposed to be
styled. You'd have different XSL style sheets then that operate on that
same XML format to produce the different styles of layout in FO XML.

Venkatesan, Balaji wrote:
> Thanks, but we will not know anything about the look of the documents,
> it can be in any style.
> We are tryng to generate Statements(with bar chart, pie chart, texts
> and images), Check documents & regular documents(with text and images)
> and
> so, it is very difficult for us to create  a pre-defined common XSL
> for all these types of documents.
>
> Assume that I have a pre-defined XSL and am creating a XML documents
> at runtime, how do you flush out the contents to the pdf documents
> without keeeping them in memory and append all the remaining
> participants data to the same pdf?. We may use Inetsoft or iText or
> any other 3rd party software to generate the pdf if we are not able to
> use fop.
>
> Thanks
>
>
> -----Original Message-----
> From: Joerg von Frantzius [mailto:joerg.von.frantzius@artnology.com]
> Sent: Friday, September 12, 2008 10:16 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Need help in writing pdf with more than 1000 pages using
> fop..
>
> Hi,
>
> what about having an intermediate XML format for your contents that is
> common to all of your clients, and having different XSL style sheets
> for producing the actual XSL-FO? You might be able to factor out
> common stuff into an included XSL.
>
> I might have not fully understood your requirements, though.
>
> Venkatesan, Balaji wrote:
>
>
> > Anu updates?
>
>
> > -----Original Message-----
> > From: Venkatesan, Balaji
> > Sent: Thursday, September 11, 2008 11:45 AM
> > To: 'fop-users@xmlgraphics.apache.org'
> > Subject: RE: Need help in writing pdf with more than 1000 pages using
> > fop..
>
> > Thanks.
>
> > But the pdf document we create is NOT of the same style everytime, we
> > are creating documents of different look and feel (but all are pdf)
> > depending on the document name for a participant. Actually, I missed
> > out our data style. It should be:
>
> > Participant1     DocumentA        Client1    Plan11
> > Participant2     DocumentB        Client1    Plan11
> > Participant3     DocumentC        Client2    Plan21
> > Participant4     DocumentA        Client2    Plan21
> > .....
> > .... and so on. Eventhough Participant1 and 4 are using the same
> > document name, since they are under different client, their document
> > definition may be entirely or slightly different.
>
> > I don't think we can have one common StyleSheet to print pdf for all
> > types of documents and that is why I am directly creating XSL-FO.
>
> > Thanks
>
>
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> > Sent: Thursday, September 11, 2008 11:34 AM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: Need help in writing pdf with more than 1000 pages using
> > fop..
>
> > 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: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
> ---------------------------------------------------------
>
> NOTICE: The information contained in this electronic mail message is
> confidential and intended only for certain recipients.  If you are not
> an intended recipient, you are hereby notified that any disclosure,
> reproduction, distribution or other use of this communication and any
> attachments is strictly prohibited.  If you have received this
> communication in error, please notify the sender by reply transmission
> and delete the message without copying or disclosing it.
>
> ============================================================================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




-- 
____________________________________________________________________
artnology GmbH - Milastra�e 4 - 10437 Berlin - Germany
Gesch�ftsf�hrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376
UST-Id. DE 217652550


RE: Need help in writing pdf with more than 1000 pages using fop..

Posted by "Venkatesan, Balaji" <Ba...@us.ing.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thanks, but we will not know anything about the look of the documents, it can be in any style. 
We are tryng to generate Statements(with bar chart, pie chart, texts and images), Check documents & regular documents(with text and images) and 
so, it is very difficult for us to create  a pre-defined common XSL for all these types of documents. 

Assume that I have a pre-defined XSL and am creating a XML documents at runtime, how do you flush out the contents to the pdf documents without keeeping them in memory and append all the remaining participants data to the same pdf?. We may use Inetsoft or iText or any other 3rd party software to generate the pdf if we are not able to use fop.

Thanks


- -----Original Message-----
From: Joerg von Frantzius [mailto:joerg.von.frantzius@artnology.com] 
Sent: Friday, September 12, 2008 10:16 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Need help in writing pdf with more than 1000 pages using fop..

Hi,

what about having an intermediate XML format for your contents that is common to all of your clients, and having different XSL style sheets for producing the actual XSL-FO? You might be able to factor out common stuff into an included XSL.

I might have not fully understood your requirements, though.

Venkatesan, Balaji wrote:
>  
>
> Anu updates?
>
>
> -----Original Message-----
> From: Venkatesan, Balaji
> Sent: Thursday, September 11, 2008 11:45 AM
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: RE: Need help in writing pdf with more than 1000 pages using 
> fop..
>
> Thanks.
>
> But the pdf document we create is NOT of the same style everytime, we 
> are creating documents of different look and feel (but all are pdf) 
> depending on the document name for a participant. Actually, I missed 
> out our data style. It should be:
>
> Participant1     DocumentA        Client1    Plan11
> Participant2     DocumentB        Client1    Plan11
> Participant3     DocumentC        Client2    Plan21
> Participant4     DocumentA        Client2    Plan21
> .....
> .... and so on. Eventhough Participant1 and 4 are using the same 
> document name, since they are under different client, their document 
> definition may be entirely or slightly different.
>
> I don't think we can have one common StyleSheet to print pdf for all 
> types of documents and that is why I am directly creating XSL-FO.
>
> Thanks
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Thursday, September 11, 2008 11:34 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Need help in writing pdf with more than 1000 pages using 
> fop..
>
> 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: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

- ---------------------------------------------------------

NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients.  If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited.  If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.

============================================================================================

- ---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




- --
____________________________________________________________________
artnology GmbH - Milastraße 4 - 10437 Berlin - Germany
Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id. DE 217652550


-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 2.8.3
Charset: iso-8859-1

wsBVAwUBSMp/EFIHx0ARICbPAQgsCgf/fX+Wnhc5rF3i7CnNBFRvm9GNmOi+ccs0
jiPUQGXEiO3IPVfUXjBqq2rf9iPG8htD32DCtnGeN17IShSraXtI3MCnSVLmiftZ
xwDYLWrnChs0kMWqJTRX13SCifDRRBdICmMlMyoH9jtI3N0sxHcWZyFlkFIyJGmf
h8i1DjUZj8IQpwWbVFhiGbzEs5OH7KmX/t3TfHeNazE7Vclynm6uUsJRv7ZfTGCm
lTsPEOokAmJXCEuqcOmH0fUqJYnBQOE6go1KcZgU9tTV4OervSgPHQhi2wU+tRTr
Fxve3rnI4E+9JhoyNvAhQxJ/HED/eeGLM8hclRFjFP2LJyocyjnxJg==
=FOQ+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Need help in writing pdf with more than 1000 pages using fop..

Posted by Joerg von Frantzius <jo...@artnology.com>.
Hi,

what about having an intermediate XML format for your contents that is
common to all of your clients, and having different XSL style sheets for
producing the actual XSL-FO? You might be able to factor out common
stuff into an included XSL.

I might have not fully understood your requirements, though.

Venkatesan, Balaji wrote:
>  
>
> Anu updates?
>
>
> -----Original Message-----
> From: Venkatesan, Balaji
> Sent: Thursday, September 11, 2008 11:45 AM
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: RE: Need help in writing pdf with more than 1000 pages using
> fop..
>
> Thanks.
>
> But the pdf document we create is NOT of the same style everytime, we
> are creating documents of different look and feel (but all are pdf)
> depending on the document name for a participant. Actually, I missed out
> our data style. It should be:
>
> Participant1     DocumentA        Client1    Plan11
> Participant2     DocumentB        Client1    Plan11
> Participant3     DocumentC        Client2    Plan21
> Participant4     DocumentA        Client2    Plan21
> .....
> .... and so on. Eventhough Participant1 and 4 are using the same document
> name, since they are under different client, their document definition
> may be entirely or slightly different.
>
> I don't think we can have one common StyleSheet to print pdf for all
> types of documents and that is why I am directly creating XSL-FO.
>
> Thanks
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Thursday, September 11, 2008 11:34 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Need help in writing pdf with more than 1000 pages using
> fop..
>
> 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: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------

NOTICE: The information contained in this electronic mail message is
confidential and intended only for certain recipients.  If you are not
an intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication and any
attachments is strictly prohibited.  If you have received this
communication in error, please notify the sender by reply transmission
and delete the message without copying or disclosing it.

============================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




-- 
____________________________________________________________________
artnology GmbH - Milastra�e 4 - 10437 Berlin - Germany
Gesch�ftsf�hrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376
UST-Id. DE 217652550


RE: Need help in writing pdf with more than 1000 pages using fop..

Posted by "Venkatesan, Balaji" <Ba...@us.ing.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

 

Anu updates?


- -----Original Message-----
From: Venkatesan, Balaji 
Sent: Thursday, September 11, 2008 11:45 AM
To: 'fop-users@xmlgraphics.apache.org'
Subject: RE: Need help in writing pdf with more than 1000 pages using
fop..

Thanks.

But the pdf document we create is NOT of the same style everytime, we
are creating documents of different look and feel (but all are pdf)
depending on the document name for a participant. Actually, I missed out
our data style. It should be:

Participant1 	DocumentA		Client1	Plan11
Participant2 	DocumentB		Client1	Plan11
Participant3 	DocumentC		Client2	Plan21
Participant4 	DocumentA		Client2	Plan21
.....
.... and so on. Eventhough Participant1 and 4 are using the same document
name, since they are under different client, their document definition
may be entirely or slightly different.

I don't think we can have one common StyleSheet to print pdf for all
types of documents and that is why I am directly creating XSL-FO. 

Thanks


- -----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Thursday, September 11, 2008 11:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Need help in writing pdf with more than 1000 pages using
fop..

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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 2.8.3
Charset: us-ascii

wsBVAwUBSMp2VVIHx0ARICbPAQg4cAgAl8pGviG/TPVBNe21/VOdSxxyh8APKaXd
a/A8RwXyIl1eeRVKlJ4muTNLOulx7SkpDifSuCfD3WivG6IZalsG+kTJms/aTUKF
l9HHGGjrILom59CGG7I1GQzbIAmtiamNuFmSF7VlHVMVao/k4UkMG7jPcnB42H7e
QsXxcxo/CWo4eHH5eEdjwoE6GxZ3mp2a4Yo694wzUy9wBLIjW7633hWer2Jc/RQW
g1KFyQk2MDO2GJhzmqz+O9kwW8O5q9ko6KFtrd0JNbRrxw/779xTgt0lu544xqRX
kpZjIR/eQ/VKqbYhQawkYiy9pZ9pcCu5diwZTIyvMk0vLQLk7+BDVA==
=7DkY
-----END PGP SIGNATURE-----

---------------------------------------------------------

NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients.  If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited.  If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.

============================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Need help in writing pdf with more than 1000 pages using fop..

Posted by "Venkatesan, Balaji" <Ba...@us.ing.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thanks.

But the pdf document we create is NOT of the same style everytime, we
are creating documents of different look and feel (but all are pdf)
depending on the document name for a participant. Actually, I missed out
our data style. It should be:

Participant1 	DocumentA		Client1	Plan11
Participant2 	DocumentB		Client1	Plan11
Participant3 	DocumentC		Client2	Plan21
Participant4 	DocumentA		Client2	Plan21
.....
.... and so on. Eventhough Participant1 and 4 are using the same document
name, since they are under different client, their document definition
may be entirely/slightly different.

I don't think we can have one common StyleSheet to print pdf for all
types of documents and that is why I am directly creating XSL-FO. 

Thanks
balaji

===================================
Balaji Venkatesan
*617-376-9257
*balaji.venkatesan@us.ing.com
ING. Your future. Made easier.SM
===================================

- -----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Thursday, September 11, 2008 11:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Need help in writing pdf with more than 1000 pages using
fop..

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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 2.8.3
Charset: us-ascii

wsBVAwUBSMk9AVIHx0ARICbPAQjwRQf/cEEvNSQip5nDGEIc2H0oUZA1Qg+ZT/wm
110OwDJIY3zpi8b4BK3V/4HSC8+wFxiPPaXEnVevpOUM65hR6826fpRRuHGP7j0f
CQVdWH4yfwTrLkMabu4jtQCOybLHhEUo+uU5kYg4OZWbDKuw4t14gamo7FrJ1jft
gdUaDGmIKauf68XXnSW/GtUNcZaxHsT35Cq09+aVxBosbdoeCuDmk0HSvyqdUfEE
ljx+gPCzxt6Sxdg3izsj4baQCDH3iR7m9PXrzgP5QFwY1myZO+9XPKij+I/0UQKT
9T/HLtphntXmTQ/Qi5TQRm2/H+XC24h3k5s0Om//ZfmwcNMkut4M7g==
=BvnA
-----END PGP SIGNATURE-----

---------------------------------------------------------

NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients.  If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited.  If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.

============================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Need help in writing pdf with more than 1000 pages using fop..

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org