You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Phillip B Oldham <ph...@gmail.com> on 2012/07/02 13:23:31 UTC

Is this layout possible? 2 col with full-width image

Hi all

I'd like to have a 2-col layout which flows over a number of pages,
but on the first page I'd like to have an image which displays across
both columns. Preferably, I'd like to have this image at the bottom of
the page, but if this isn't achievable having it at the top of the
page would be fine.

The problem I'm having is that the image doesn't seem to break across
both columns - just one. Approaches I have tried include:

- Wrapping the "column content" in a block-container, and having the
block containing the image before this.
- Placing the block containing in the image within the block-container
and setting `span="all"`.
- Creating a footnote (this causes the first column to flow to the
footer and render below the image, but the second column does break as
expected).
- Floats (don't seem to work at all).

Tables aren't an option as the content is dynamic; I cannot be sure of
length and therefore can't break into left/right cols. The image is
supplied also; while I can set the width, the hight could be anything
so I can't use margins/padding to fix the issue.

I've attached a PDF to show the problems I'm having, and the FO which
I'm using, along with an image to help describe what I'm trying to
achieve.

Any suggestions?

-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01

Re: Is this layout possible? 2 col with full-width image

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

The span attribute should be set on the top-level fo:block-container:
<fo:block-container span="all">
  <fo:block>
    <fo:external-graphic...
This will give you the expected output.

2012/7/2 Phillip B Oldham <ph...@gmail.com>:
> Hi all
>
> I'd like to have a 2-col layout which flows over a number of pages,
> but on the first page I'd like to have an image which displays across
> both columns. Preferably, I'd like to have this image at the bottom of
> the page, but if this isn't achievable having it at the top of the
> page would be fine.
>
> The problem I'm having is that the image doesn't seem to break across
> both columns - just one. Approaches I have tried include:
>
> - Wrapping the "column content" in a block-container, and having the
> block containing the image before this.
> - Placing the block containing in the image within the block-container
> and setting `span="all"`.
> - Creating a footnote (this causes the first column to flow to the
> footer and render below the image, but the second column does break as
> expected).
> - Floats (don't seem to work at all).
>
> Tables aren't an option as the content is dynamic; I cannot be sure of
> length and therefore can't break into left/right cols. The image is
> supplied also; while I can set the width, the hight could be anything
> so I can't use margins/padding to fix the issue.
>
> I've attached a PDF to show the problems I'm having, and the FO which
> I'm using, along with an image to help describe what I'm trying to
> achieve.
>
> Any suggestions?
>
> --
> Phillip B Oldham
> phillip.oldham@gmail.com
> +44 (0) 7525 01 09 01


-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org