Search code examples
xsl-fo

Split a single page in 2 vertical half XSL-FO


I have one single page in my PDF, half of the page is occupied by an image. For the rest half of page I want to split it in 2 vertical halves, so that whatever I write should be split in 2 vertical half on same page.

Below is the code I am trying:-

<fo:block-container page-break-inside="auto">
                                <fo:block>
                                    <xsl:value-of select="FirstPage/Quote"/>
                                </fo:block>
</fo:block-container>

Any suggestion how it can be achieved. I have also attached a sample image showing what I wish to achieve.sample_image


Solution

  • You can achieve that by specifying that your region-body must have 2 columns:

    <fo:region-body column-count="2" column-gap="5mm"
    

    and the elements that should span both columns (e.g. the block that contains your image) get a span atribute:

    <fo:block span="all">