Hi,
I'm relatively new to XSL-FO and FOP. I've got to the point where I need
community advice.
We’re generating PDFs with dynamic content, including a known section across
one or more pages towards the end of the document. We're also generating text
on the first page that references the page numbers of said section. The
difficulty comes due to a formatting requirement ... when we're referencing a
single page, the format MUST be a single number, whilst when referencing
multiple pages it should be of the form ${first page} - ${last page}.
We tried the case where we had the referenced content in one block with id=A,
and a second empty block following with id=B. When using
<fo:page-number-citation> for both blocks, there's no option to change format
based on number of pages ...
<fo:block>
Pages <fo:page-number-citation ref-id="A"/> -
<fo:page-number-citation ref-id="B"/>
</fo:block>
So, where the section is on a single page, our reference becomes "9 - 9". And
strict formatting requirements mean we are not allowed to generate this format
in this case.
I got excited when I saw some of the Index related FO objects in the XSL-FO
spec, but then discovered that FOP currently does not support any of the index
features. Is this true?
I then found support listed for <fo:multi-switch> on the FOP compliance web
page, but it seems to imply that this is only implemented for the extension
property "fox:auto-toggle". So I'm guessing this won't support our
requirements either. Is this true?
Exhausting my exceedingly limited xsl-fo knowledge, and if you can confirm
there's no xsl-fo solution to this, I'm left assuming I have possibly two
options (listed in the order of preference):
1. Generate the intermediate format / area tree format, edit, then render from
that format. (is this possible? If so, should one use the IF or the AT format?)
2. Post process the rendered PDF (using PDFBox, iText, or something similar).
I'm hoping someone more experienced than me can comment on relevant XSL-FO
capabilities within FOP, and if necessary, the IF/AT question/approach.
Many thanks
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]