The pdf conversion process needs a fo renderer to convert the
fo document into the requested format. The fo renderer is encapsulated in
The FORenderer can be:
1. The default ApacheFORenderer that gets used if no custom FORenderer has been passed.
This renderer contains the functionality and replaces the classes FopFactoryUtil and FopResultUtils.
The configuration and the result mime is passed via the FOSettings.
2. A custom implementation of the FORenderer interface that gets passed via the FOSettings to the
3. The DummyFORenderer, that gets used if INTERNAL_FO_MIME has been selected as the output format
in apacheFopMime. Passing the INTERNAL_FO_MIME as the result mime acts as a flag, it selects the
DummyFORenderer and ensures that the rendering is done as a one pass process (in this case, the
result might not be correct, since a two pass conversion may be necessary). The DummyFORenderer itself
just passes the generated fo to the output stream.
The conversion process might need a two pass conversion, if this is the case,
then the body of some elements might contain a placeholder that needs to be
replaced with the page count in the document or the page count in the section.
A placeholder for the page count of the document is defined as
PLACEHOLDER_PREFIX + getDocumentPageCountID() + PLACEHOLDER_SUFFIX
A placeholder for the page count of a section is defined as
PLACEHOLDER_PREFIX + getSectionPageCountID() + PLACEHOLDER_SUFFIX
The values need to be calculated by the renderer and the placeholder replaced. The format
of the numbers is defined for the page count of the document by getDocumentPageCountFoFormat() and
the one for the section by getSectionPageCountFoFormat();