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 Lo...@log-net.com on 2008/08/14 18:16:10 UTC

blocks flowing from left to right?

I have a requirement of a report to print several blocks aligned from left 
to right and then top to bottom.  These blocks will contain two blocks 
that align top to bottom.  So, it looks something like this:


BLOCK1  BLOCK2  BLOCK3
DATA1    DATA2    DATA3

The blocks also need to have custom widths, borders and background colors. 
 So far, I have not been able to implement this layout with inlines or 
blocks.  Does anyone have any suggestions?

FOP 0.94, JDK 1.5

-Lou

Re: blocks flowing from left to right?

Posted by Chris Bowditch <bo...@hotmail.com>.
Jay Bryant wrote:
> Hi, Lou,
> 
> I see now.
> 
> I think you've hit your best choice with the table-per-row notion.
> 
> It's not ideal, but it has the virtue of getting the job done.

I agree. The only other alternative solution offered by XSL-FO is 
fo:inline-container. However, this isn't implemented by FOP so you 
really need to use Tables to solve this requirement.

<snip/>

Chris



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


Re: blocks flowing from left to right?

Posted by Jay Bryant <ja...@bryantcs.com>.
Hi, Lou,

I see now.

I think you've hit your best choice with the table-per-row notion.

It's not ideal, but it has the virtue of getting the job done.

J

----- Original Message ----- 
From: <Lo...@log-net.com>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, August 14, 2008 1:54 PM
Subject: Re: blocks flowing from left to right?


> J:
>
> Oops, I left out a big part of it (and why a table won't work):  Each
> block could be a different width.  This makes it tough to lay out in a
> standard table.  I guess I could make each row a table unto itself, but I
> was hoping I missed something.
>
> My updated (and better example) looks like this:
>
> BLOCK1  BLOCK2  BLOCK3
> DATA1   DATA2   DATA3
> BLOCK4VERYWIDE  BL5  BLOCK6
> DATA_________6  XXX  DATA6
> BLOCK7NOMORE
> DATA       7
>
> It's pretty ugly, but it is a custom document for a client and this is the
> way they want it.
>
> BTW, cell background colors work great.
>
>
>
>
>
> "Jay Bryant" <ja...@bryantcs.com>
> 08/14/2008 01:50 PM
> Please respond to
> fop-users@xmlgraphics.apache.org
>
>
> To
> <fo...@xmlgraphics.apache.org>
> cc
>
> Subject
> Re: blocks flowing from left to right?
>
>
>
>
>
>
> That sure looks like a table, Lou.
>
> You know enough about document design to realize that, too, so I'm
> guessing
> there's some other factor that makes you think a table isn't a good fit.
> Are
> the blocks irregular in size or something like that? Or is it that you
> can't
> get a table to have different backgrounds and borders on each cell? I know
>
> you can get different borders on each cell (I've been doing that), but I
> haven't tinkered with backgrounds.
>
> FOP 0.95 is available, by the way. Perhaps it contains a change that would
>
> help.
>
> J
>
> ----- Original Message ----- 
> From: <Lo...@log-net.com>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Thursday, August 14, 2008 11:16 AM
> Subject: blocks flowing from left to right?
>
>
>>I have a requirement of a report to print several blocks aligned from
> left
>> to right and then top to bottom.  These blocks will contain two blocks
>> that align top to bottom.  So, it looks something like this:
>>
>>
>> BLOCK1  BLOCK2  BLOCK3
>> DATA1    DATA2    DATA3
>>
>> The blocks also need to have custom widths, borders and background
> colors.
>> So far, I have not been able to implement this layout with inlines or
>> blocks.  Does anyone have any suggestions?
>>
>> FOP 0.94, JDK 1.5
>>
>> -Lou
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> 


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


Re: blocks flowing from left to right?

Posted by Lo...@log-net.com.
J:

Oops, I left out a big part of it (and why a table won't work):  Each 
block could be a different width.  This makes it tough to lay out in a 
standard table.  I guess I could make each row a table unto itself, but I 
was hoping I missed something.

My updated (and better example) looks like this:

BLOCK1  BLOCK2  BLOCK3
DATA1   DATA2   DATA3
BLOCK4VERYWIDE  BL5  BLOCK6
DATA_________6  XXX  DATA6
BLOCK7NOMORE
DATA       7

It's pretty ugly, but it is a custom document for a client and this is the 
way they want it.

BTW, cell background colors work great.





"Jay Bryant" <ja...@bryantcs.com> 
08/14/2008 01:50 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
<fo...@xmlgraphics.apache.org>
cc

Subject
Re: blocks flowing from left to right?






That sure looks like a table, Lou.

You know enough about document design to realize that, too, so I'm 
guessing 
there's some other factor that makes you think a table isn't a good fit. 
Are 
the blocks irregular in size or something like that? Or is it that you 
can't 
get a table to have different backgrounds and borders on each cell? I know 

you can get different borders on each cell (I've been doing that), but I 
haven't tinkered with backgrounds.

FOP 0.95 is available, by the way. Perhaps it contains a change that would 

help.

J

----- Original Message ----- 
From: <Lo...@log-net.com>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, August 14, 2008 11:16 AM
Subject: blocks flowing from left to right?


>I have a requirement of a report to print several blocks aligned from 
left
> to right and then top to bottom.  These blocks will contain two blocks
> that align top to bottom.  So, it looks something like this:
>
>
> BLOCK1  BLOCK2  BLOCK3
> DATA1    DATA2    DATA3
>
> The blocks also need to have custom widths, borders and background 
colors.
> So far, I have not been able to implement this layout with inlines or
> blocks.  Does anyone have any suggestions?
>
> FOP 0.94, JDK 1.5
>
> -Lou
> 


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



Re: blocks flowing from left to right?

Posted by Jay Bryant <ja...@bryantcs.com>.
That sure looks like a table, Lou.

You know enough about document design to realize that, too, so I'm guessing 
there's some other factor that makes you think a table isn't a good fit. Are 
the blocks irregular in size or something like that? Or is it that you can't 
get a table to have different backgrounds and borders on each cell? I know 
you can get different borders on each cell (I've been doing that), but I 
haven't tinkered with backgrounds.

FOP 0.95 is available, by the way. Perhaps it contains a change that would 
help.

J

----- Original Message ----- 
From: <Lo...@log-net.com>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, August 14, 2008 11:16 AM
Subject: blocks flowing from left to right?


>I have a requirement of a report to print several blocks aligned from left
> to right and then top to bottom.  These blocks will contain two blocks
> that align top to bottom.  So, it looks something like this:
>
>
> BLOCK1  BLOCK2  BLOCK3
> DATA1    DATA2    DATA3
>
> The blocks also need to have custom widths, borders and background colors.
> So far, I have not been able to implement this layout with inlines or
> blocks.  Does anyone have any suggestions?
>
> FOP 0.94, JDK 1.5
>
> -Lou
> 


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