XSL:FO Question

M

MArc Baumgartner

Hello all,

I have got a Question about XSL:FO:

A XML-File contains any customers. For every customer I have to
generate a letter. This letter can contain - depending on the
information about the customer - from 1 to 5 pages.

On every page I have to put the relative page number (e.g. 1-5) and
the absolute page number (e.g. 456). All letter should be in one
result-pdf-file.

Furthermore I have to put a code for an enveloping machine (depending
on the relative page number) on every page.

I think I have to use the page-sequence-master but I can't find any
further information / examples.....

Can someone help me?

Thanks in adavance!
Marc
 
M

Mike Partridge

I've got this working with much the same situation that you have. In
order to do page numbering within a letter, you simply need a
page-sequence for each. Ex:

<xsl:template match="/">

<fo:root>
<fo:layout-master-set>
<xsl:call-template name="invoice_layout_master"/>
</fo:layout-master-set>

<xsl:apply-templates select="/invoice_set/invoice"/>

</fo:root>
</xsl:template>

The <xsl:template match="invoice"> then has a page sequence. At the
very end of the region-body I have an empty block:

<fo:block id="{generate-id()}"/>

Which is referenced in region-after using page-number-citation like
so:

<fo:page-number-citation ref-id="{generate-id()}"/>

That should give you an idea of how to do the letter-level page
numbering; I'm not sure how you can do overall page numbering, but I
have seen discussion about envelope machine marking on the fop-user
mailing list.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top