I'm using the rx:flow-section functionnaly of RenderX to separate a page in two. However I would like to have a straight line that would go all the way through the page between the two flow section.
Is this something possible ? I have a limited knowledge, and I assume it would not be possible to add a fo:leader because if I had one it will be duplicated on each side of the flow-section.
Well, RenderX XEP does not provide a special extension to draw the gutter/column rule. However, it can be done. one way that is likely not desired would be to format all other content with a background-color of white and insert a full-page length rule or set of rules.
I will give this solution. It will scare off most because it is only internally probably doing what you could do. But is also shows just a small sample of what you can do.
I have done this in the past by taking advantage of RenderX's Intermediate Output format (XEPOUT) and a few tricks. When you are using RenderX, you can request to output XEPOUT instead of the final output format (like PDF). XEPOUT is a structured and documented XML format. You can use XSL to modify it and then send that modified XEPOUT back to the engine to get the final PDF.
Essentially the process would be:
XML + XSL -> XEPOUT + XSL -> new XEPOUT -> RenderX -> PDF
Just adding that one step in the process to use an XSL to modify XEPOUT. I will post this below, if you need more information on how to make this work in your environment, it would highly depend on how you use or integrate RenderX.
There are many tricks one can implement. In this case, what I did is apply a red background color behind the rx:flow-section. If you formatted that to the XEPOUT you would find in the content (among all the other text and stuff):
<xep:rgb-color red="1.0" green="0.0" blue="0.0"/>
<xep:rectangle x-from="72000" y-from="93600" x-till="282000" y-till="676800"/>
This is the red rectangle behind each of the columns of the flow-section.
If I were to format that document I would get this:
But if I instead format to XEPOUT and then use XSL to process it, I can change the document before creating the PDF.
Using a simple XSL, I could actually remove those red rectangles and use the dimensions and make a line between the columns. This example assumed only a two column document but you could modify to be as you wish (including picking an alternate color than red). I didn't do the full job here, you could enhance this to more center the line, or even implement multiple lines. This is only an example to get you rolling should you choose to do something like this.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:math="http://exslt.org/math"
xmlns:xep="http://www.renderx.com/XEP/xep" exclude-result-prefixes="math" version="1.0">
<xsl:template match="xep:page">
<!-- Get page width -->
<xsl:variable name="page-width">
<xsl:value-of select="number(@width)"/>
</xsl:variable>
<!-- get lower and upper y-pos of longest line {color} xep:rectangle -->
<xsl:variable name="y-till-pos">
<xsl:value-of select="math:min(xep:rgb-color[@red='1.0']/following-sibling::xep:rectangle[1]/@y-till)"/>
</xsl:variable>
<xsl:variable name="y-from-pos">
<xsl:value-of select="xep:rgb-color[@red='1.0']/following-sibling::xep:rectangle[1]/@y-from - 12000"/>
</xsl:variable>
<xep:page>
<xsl:apply-templates select="@*"/>
<!-- Draw Line -->
<xep:line x-from="{$page-width div 2 - 500}" y-from="{$y-from-pos}" x-till="{$page-width div 2 + 500}" y-till="{$y-till-pos}" thickness="1000" style="solid"/>
<xsl:apply-templates select="*"/>
</xep:page>
</xsl:template>
<!-- remove red and rectangle -->
<xsl:template match="xep:rectangle[preceding-sibling::*[1][name()='xep:rgb-color'][@red='1.0']]"/>
<xsl:template match="xep:rgb-color[@red='1.0']"/>
<!-- identity copy rules -->
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
The result in two-page view in PDF shows the result:
Which is a rx:flow-section with a column divider like you wish.
As I said, it is a lot but there is so much more you can do using the same techniques. Like bookfolding results or making n-up pages or applying gradients to text or injecting page count marks or barcodes.