Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSL-FO Transform With Two Types Of Pages

796254Jul 1 2004 — edited Jul 12 2004
I'm trying to write an XSL-FO transformation of an XML stream that will produce a PDF. I'm using Jakarta's FOP library.

Being a big decomposition fan, I wrote one stylesheet to generate the first type of PDF. I'll call that "data", because it consists of several pages, all with the same format, where the number of pages depends on the size of the XML dataset.

Then I wrote a second stylesheet to generate a second type of PDF. I'll call that "summary", because it's a single page that uses a radically different format from the "data" page. It operates on the same XML stream.

Now I really need to combine these two in such a way that I operate on that XML stream and produce a single PDF that has a single "summary" page as the first page, followed by as many "data" pages as needed.

All the Jakarta FO examples that use more than one page master are of the "left/right" variety. My first feeble attempt to combine these two gives me the "summary" page just fine, but I'm not getting any of the following "data" pages.

Is it necessary to combine these into one XSL stylesheet? Is there any clever s'ware out there that could combine the two PDFs into one that I don't know about (e.g., iText)? I know iText is a Java API to generate PDFs. Can it concatenate two into one?

If someone could steer me to an example that might help me out I'd appreciate it. Just knowing that someone has done something like this would be a comfort.

%
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2004
Added on Jul 1 2004
18 comments
241 views