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 "David P. Nesbitt" <da...@yahoo.com> on 2006/06/06 04:38:52 UTC

list-item formatting in 0.92

The formatting of list-item has seemed to have changed
from 0.20.5 to 0.92.  I have a list item (code
contained below) that is rending as follows in 0.92:

             ---------------------
             |item-body (block 1)|
             ---------------------
------------
|item-label|
------------
             ---------------------
             |item-body (block 2)|
             ---------------------

Here is what I am expecting and how 0.20.5 seemed to
work (unless something else in the port is causing
this changed behavior):

------------ ---------------------
|item-label| |item-body (block 1)|
------------ ---------------------
             ---------------------
             |item-body (block 2)|
             ---------------------

How can I get my desired behavior in 0.92?

Regards,
Dave

			<fo:list-block>
				<fo:list-item>
					<fo:list-item-label>
						<fo:block text-align="left"
padding-before="0.15in" width="3.50in">
							<fo:external-graphic
src="intelligent_systems_logo.gif" 
content-height="0.75in" content-width="3.0in" />
						</fo:block>
					</fo:list-item-label>
					<fo:list-item-body>
						<fo:block>
							<fo:block text-align="right"
padding-before="0.15in" font-size="14pt"
font-weight="bold" color="#0000C0"
vertical-align="middle">Current Out Of Stock
Report</fo:block>
							<fo:block text-align="right"
padding-before="0.0675in" font-size="9pt"
font-weight="bold" color="gray"
vertical-align="top">June 05, 2006 at 01:16
PM</fo:block>
						</fo:block>
					</fo:list-item-body>
				</fo:list-item>
			</fo:list-block>



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: list-item formatting in 0.92

Posted by "David P. Nesbitt" <da...@yahoo.com>.
Thanks, Jeremias!

--- Jeremias Maerki <de...@jeremias-maerki.ch> wrote:

> David,
> 
> the reason for the problem is a vertical overflow in
> the static-content.
> 
> Log output:
> WARNING: static-content overflows the available
> area. (fo:static-content, "Header1, Header2")
> 
> It's always a good idea to look at warnings on the
> log even if they may
> seem unrelated. You can also see now why just
> posting a snippet is
> sometimes not enough. Always post complete examples
> because the actual
> problem could lie elsewhere. So, if you increase the
> extent for
> region-before, the problem vanishes. There's no real
> bug. It could be
> said however, that some of the code in
> StaticContentLayoutManager and
> ListItemLayoutManager could probably be improved a
> little to avoid these
> somewhat strange results.
> 
> Some technical background for those interested as to
> why the problem
> manifested itself as it did:
> Since the content in static-content overflows, it is
> broken into two
> parts by the breaker (same code as for page
> breaking). The
> StaticContentLayoutManager renders the second part
> right under the first.
> Since the breakpoint is between the block 1 and
> block 2 in the item-body,
> the block 2 is rendered as part of the second part.
> It could be said
> that the StaticContent should probably not render
> the generated parts
> but rather the whole sequence in case of an
> overflow. Furthermore, we
> could try to find out why the ListItemLayoutManager
> did not combine
> block 1 and block2 as the element list from the
> label should not allow
> breaking these two apart (because of the image's
> height).
> 
> On 08.06.2006 20:17:48 David P. Nesbitt wrote:
> > Jeremias,
> > 
> > I think the three enclosed files demonstrate what
> I am
> > seeing.  Please place them in the same directory
> and
> > run the following command:
> > 
> > fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf
> > 
> > You will see the behavior that I described earlier
> (I
> > hope).  Namely:
> > 
> >              ---------------------
> >              |item-body (block 1)|
> >              ---------------------
> > ------------
> > |item-label|
> > ------------
> >              ---------------------
> >              |item-body (block 2)|
> >              ---------------------
> > 
> > Interestingly, if you change the "change-me"
> variable
> > from '1.56in' to '1.57in', I think you will see
> the
> > following behavior:
> > 
> >              ---------------------
> >              |item-body (block 1)|
> >              ---------------------
> > ------------ ---------------------
> > |item-label| |item-body (block 2)|
> > ------------ ---------------------
> > 
> > Is that what you would expect?  I would expect the
> > following:
> > 
> > ------------ ---------------------
> > |item-label| |item-body (block 1)|
> > ------------ ---------------------
> >              ---------------------
> >              |item-body (block 2)|
> >              ---------------------
> > 
> > Is there a way to get my expected behavior?
> > 
> > Thanks again for your assistance.
> > 
> > Regards,
> > Dave
> > 
> > 
> > 
> > --- Jeremias Maerki <de...@jeremias-maerki.ch>
> wrote:
> > 
> > > It could, yes, especially since I can't
> reproduce
> > > it. Maybe if you have
> > > a full, scaled-down FO file that demonstrates
> it.
> > > Maybe your snippet is
> > > just not enough to demonstrate what's going on.
> > > 
> > > On 06.06.2006 18:15:26 David P. Nesbitt wrote:
> > > > Jeremias,
> > > > 
> > > > Thanks for the assistance.  Would it help if I
> > > > provided the generated PDF?
> > > > 
> > > > Regards,
> > > > Dave
> > > > 
> > > > --- Jeremias Maerki <de...@jeremias-maerki.ch>
> > > wrote:
> > > > 
> > > > > Hmm, I don't see the effect you describe.
> The
> > > > > snippet renders as I would
> > > > > expect.
> > > > > 
> > > > > On 06.06.2006 04:38:52 David P. Nesbitt
> wrote:
> > > > > > The formatting of list-item has seemed to
> have
> > > > > changed
> > > > > > from 0.20.5 to 0.92.  I have a list item
> (code
> > > > > > contained below) that is rending as
> follows in
> > > > > 0.92:
> > > > > > 
> > > > > >              ---------------------
> > > > > >              |item-body (block 1)|
> > > > > >              ---------------------
> > > > > > ------------
> > > > > > |item-label|
> > > > > > ------------
> > > > > >              ---------------------
> > > > > >              |item-body (block 2)|
> > > > > >              ---------------------
> > > > > > 
> > > > > > Here is what I am expecting and how 0.20.5
> > > seemed
> > > > > to
> > > > > > work (unless something else in the port is
> > > causing
> > > > > > this changed behavior):
> > > > > > 
> > > > > > ------------ ---------------------
> > > > > > |item-label| |item-body (block 1)|
> > > > > > ------------ ---------------------
> > > > > >              ---------------------
> > > > > >              |item-body (block 2)|
> > > > > >              ---------------------
> > > > > > 
> > > > > > How can I get my desired behavior in 0.92?
> > > <snip/>
> > > 
> > > 
> > > 
> > > Jeremias Maerki
> 
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: list-item formatting in 0.92

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
David,

the reason for the problem is a vertical overflow in the static-content.

Log output:
WARNING: static-content overflows the available area. (fo:static-content, "Header1, Header2")

It's always a good idea to look at warnings on the log even if they may
seem unrelated. You can also see now why just posting a snippet is
sometimes not enough. Always post complete examples because the actual
problem could lie elsewhere. So, if you increase the extent for
region-before, the problem vanishes. There's no real bug. It could be
said however, that some of the code in StaticContentLayoutManager and
ListItemLayoutManager could probably be improved a little to avoid these
somewhat strange results.

Some technical background for those interested as to why the problem
manifested itself as it did:
Since the content in static-content overflows, it is broken into two
parts by the breaker (same code as for page breaking). The
StaticContentLayoutManager renders the second part right under the first.
Since the breakpoint is between the block 1 and block 2 in the item-body,
the block 2 is rendered as part of the second part. It could be said
that the StaticContent should probably not render the generated parts
but rather the whole sequence in case of an overflow. Furthermore, we
could try to find out why the ListItemLayoutManager did not combine
block 1 and block2 as the element list from the label should not allow
breaking these two apart (because of the image's height).

On 08.06.2006 20:17:48 David P. Nesbitt wrote:
> Jeremias,
> 
> I think the three enclosed files demonstrate what I am
> seeing.  Please place them in the same directory and
> run the following command:
> 
> fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf
> 
> You will see the behavior that I described earlier (I
> hope).  Namely:
> 
>              ---------------------
>              |item-body (block 1)|
>              ---------------------
> ------------
> |item-label|
> ------------
>              ---------------------
>              |item-body (block 2)|
>              ---------------------
> 
> Interestingly, if you change the "change-me" variable
> from '1.56in' to '1.57in', I think you will see the
> following behavior:
> 
>              ---------------------
>              |item-body (block 1)|
>              ---------------------
> ------------ ---------------------
> |item-label| |item-body (block 2)|
> ------------ ---------------------
> 
> Is that what you would expect?  I would expect the
> following:
> 
> ------------ ---------------------
> |item-label| |item-body (block 1)|
> ------------ ---------------------
>              ---------------------
>              |item-body (block 2)|
>              ---------------------
> 
> Is there a way to get my expected behavior?
> 
> Thanks again for your assistance.
> 
> Regards,
> Dave
> 
> 
> 
> --- Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> 
> > It could, yes, especially since I can't reproduce
> > it. Maybe if you have
> > a full, scaled-down FO file that demonstrates it.
> > Maybe your snippet is
> > just not enough to demonstrate what's going on.
> > 
> > On 06.06.2006 18:15:26 David P. Nesbitt wrote:
> > > Jeremias,
> > > 
> > > Thanks for the assistance.  Would it help if I
> > > provided the generated PDF?
> > > 
> > > Regards,
> > > Dave
> > > 
> > > --- Jeremias Maerki <de...@jeremias-maerki.ch>
> > wrote:
> > > 
> > > > Hmm, I don't see the effect you describe. The
> > > > snippet renders as I would
> > > > expect.
> > > > 
> > > > On 06.06.2006 04:38:52 David P. Nesbitt wrote:
> > > > > The formatting of list-item has seemed to have
> > > > changed
> > > > > from 0.20.5 to 0.92.  I have a list item (code
> > > > > contained below) that is rending as follows in
> > > > 0.92:
> > > > > 
> > > > >              ---------------------
> > > > >              |item-body (block 1)|
> > > > >              ---------------------
> > > > > ------------
> > > > > |item-label|
> > > > > ------------
> > > > >              ---------------------
> > > > >              |item-body (block 2)|
> > > > >              ---------------------
> > > > > 
> > > > > Here is what I am expecting and how 0.20.5
> > seemed
> > > > to
> > > > > work (unless something else in the port is
> > causing
> > > > > this changed behavior):
> > > > > 
> > > > > ------------ ---------------------
> > > > > |item-label| |item-body (block 1)|
> > > > > ------------ ---------------------
> > > > >              ---------------------
> > > > >              |item-body (block 2)|
> > > > >              ---------------------
> > > > > 
> > > > > How can I get my desired behavior in 0.92?
> > <snip/>
> > 
> > 
> > 
> > Jeremias Maerki



Jeremias Maerki


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


Re: list-item formatting in 0.92

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jun 8, 2006, at 20:17, David P. Nesbitt wrote:

> Jeremias,
>
> I think the three enclosed files demonstrate what I am
> seeing.  Please place them in the same directory and
> run the following command:
>
> fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf
>
> You will see the behavior that I described earlier (I
> hope).

Confirmed here. Just ran this through FOP Trunk and the area tree  
seems to be a bit off...

At first, I thought it had something to do with lists in static- 
content, but then discovered that if you replace the graphic in the  
label with plain text, all seems fine (?)


Cheers,

Andreas



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


Re: list-item formatting in 0.92

Posted by "David P. Nesbitt" <da...@yahoo.com>.
Jeremias,

I think the three enclosed files demonstrate what I am
seeing.  Please place them in the same directory and
run the following command:

fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf

You will see the behavior that I described earlier (I
hope).  Namely:

             ---------------------
             |item-body (block 1)|
             ---------------------
------------
|item-label|
------------
             ---------------------
             |item-body (block 2)|
             ---------------------

Interestingly, if you change the "change-me" variable
from '1.56in' to '1.57in', I think you will see the
following behavior:

             ---------------------
             |item-body (block 1)|
             ---------------------
------------ ---------------------
|item-label| |item-body (block 2)|
------------ ---------------------

Is that what you would expect?  I would expect the
following:

------------ ---------------------
|item-label| |item-body (block 1)|
------------ ---------------------
             ---------------------
             |item-body (block 2)|
             ---------------------

Is there a way to get my expected behavior?

Thanks again for your assistance.

Regards,
Dave



--- Jeremias Maerki <de...@jeremias-maerki.ch> wrote:

> It could, yes, especially since I can't reproduce
> it. Maybe if you have
> a full, scaled-down FO file that demonstrates it.
> Maybe your snippet is
> just not enough to demonstrate what's going on.
> 
> On 06.06.2006 18:15:26 David P. Nesbitt wrote:
> > Jeremias,
> > 
> > Thanks for the assistance.  Would it help if I
> > provided the generated PDF?
> > 
> > Regards,
> > Dave
> > 
> > --- Jeremias Maerki <de...@jeremias-maerki.ch>
> wrote:
> > 
> > > Hmm, I don't see the effect you describe. The
> > > snippet renders as I would
> > > expect.
> > > 
> > > On 06.06.2006 04:38:52 David P. Nesbitt wrote:
> > > > The formatting of list-item has seemed to have
> > > changed
> > > > from 0.20.5 to 0.92.  I have a list item (code
> > > > contained below) that is rending as follows in
> > > 0.92:
> > > > 
> > > >              ---------------------
> > > >              |item-body (block 1)|
> > > >              ---------------------
> > > > ------------
> > > > |item-label|
> > > > ------------
> > > >              ---------------------
> > > >              |item-body (block 2)|
> > > >              ---------------------
> > > > 
> > > > Here is what I am expecting and how 0.20.5
> seemed
> > > to
> > > > work (unless something else in the port is
> causing
> > > > this changed behavior):
> > > > 
> > > > ------------ ---------------------
> > > > |item-label| |item-body (block 1)|
> > > > ------------ ---------------------
> > > >              ---------------------
> > > >              |item-body (block 2)|
> > > >              ---------------------
> > > > 
> > > > How can I get my desired behavior in 0.92?
> <snip/>
> 
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: list-item formatting in 0.92

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
It could, yes, especially since I can't reproduce it. Maybe if you have
a full, scaled-down FO file that demonstrates it. Maybe your snippet is
just not enough to demonstrate what's going on.

On 06.06.2006 18:15:26 David P. Nesbitt wrote:
> Jeremias,
> 
> Thanks for the assistance.  Would it help if I
> provided the generated PDF?
> 
> Regards,
> Dave
> 
> --- Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> 
> > Hmm, I don't see the effect you describe. The
> > snippet renders as I would
> > expect.
> > 
> > On 06.06.2006 04:38:52 David P. Nesbitt wrote:
> > > The formatting of list-item has seemed to have
> > changed
> > > from 0.20.5 to 0.92.  I have a list item (code
> > > contained below) that is rending as follows in
> > 0.92:
> > > 
> > >              ---------------------
> > >              |item-body (block 1)|
> > >              ---------------------
> > > ------------
> > > |item-label|
> > > ------------
> > >              ---------------------
> > >              |item-body (block 2)|
> > >              ---------------------
> > > 
> > > Here is what I am expecting and how 0.20.5 seemed
> > to
> > > work (unless something else in the port is causing
> > > this changed behavior):
> > > 
> > > ------------ ---------------------
> > > |item-label| |item-body (block 1)|
> > > ------------ ---------------------
> > >              ---------------------
> > >              |item-body (block 2)|
> > >              ---------------------
> > > 
> > > How can I get my desired behavior in 0.92?
<snip/>



Jeremias Maerki


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


Re: list-item formatting in 0.92

Posted by "David P. Nesbitt" <da...@yahoo.com>.
Jeremias,

Thanks for the assistance.  Would it help if I
provided the generated PDF?

Regards,
Dave

--- Jeremias Maerki <de...@jeremias-maerki.ch> wrote:

> Hmm, I don't see the effect you describe. The
> snippet renders as I would
> expect.
> 
> On 06.06.2006 04:38:52 David P. Nesbitt wrote:
> > The formatting of list-item has seemed to have
> changed
> > from 0.20.5 to 0.92.  I have a list item (code
> > contained below) that is rending as follows in
> 0.92:
> > 
> >              ---------------------
> >              |item-body (block 1)|
> >              ---------------------
> > ------------
> > |item-label|
> > ------------
> >              ---------------------
> >              |item-body (block 2)|
> >              ---------------------
> > 
> > Here is what I am expecting and how 0.20.5 seemed
> to
> > work (unless something else in the port is causing
> > this changed behavior):
> > 
> > ------------ ---------------------
> > |item-label| |item-body (block 1)|
> > ------------ ---------------------
> >              ---------------------
> >              |item-body (block 2)|
> >              ---------------------
> > 
> > How can I get my desired behavior in 0.92?
> > 
> > Regards,
> > Dave
> > 
> > 			<fo:list-block>
> > 				<fo:list-item>
> > 					<fo:list-item-label>
> > 						<fo:block text-align="left"
> > padding-before="0.15in" width="3.50in">
> > 							<fo:external-graphic
> > src="intelligent_systems_logo.gif" 
> > content-height="0.75in" content-width="3.0in" />
> > 						</fo:block>
> > 					</fo:list-item-label>
> > 					<fo:list-item-body>
> > 						<fo:block>
> > 							<fo:block text-align="right"
> > padding-before="0.15in" font-size="14pt"
> > font-weight="bold" color="#0000C0"
> > vertical-align="middle">Current Out Of Stock
> > Report</fo:block>
> > 							<fo:block text-align="right"
> > padding-before="0.0675in" font-size="9pt"
> > font-weight="bold" color="gray"
> > vertical-align="top">June 05, 2006 at 01:16
> > PM</fo:block>
> > 						</fo:block>
> > 					</fo:list-item-body>
> > 				</fo:list-item>
> > 			</fo:list-block>
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: list-item formatting in 0.92

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, I don't see the effect you describe. The snippet renders as I would
expect.

On 06.06.2006 04:38:52 David P. Nesbitt wrote:
> The formatting of list-item has seemed to have changed
> from 0.20.5 to 0.92.  I have a list item (code
> contained below) that is rending as follows in 0.92:
> 
>              ---------------------
>              |item-body (block 1)|
>              ---------------------
> ------------
> |item-label|
> ------------
>              ---------------------
>              |item-body (block 2)|
>              ---------------------
> 
> Here is what I am expecting and how 0.20.5 seemed to
> work (unless something else in the port is causing
> this changed behavior):
> 
> ------------ ---------------------
> |item-label| |item-body (block 1)|
> ------------ ---------------------
>              ---------------------
>              |item-body (block 2)|
>              ---------------------
> 
> How can I get my desired behavior in 0.92?
> 
> Regards,
> Dave
> 
> 			<fo:list-block>
> 				<fo:list-item>
> 					<fo:list-item-label>
> 						<fo:block text-align="left"
> padding-before="0.15in" width="3.50in">
> 							<fo:external-graphic
> src="intelligent_systems_logo.gif" 
> content-height="0.75in" content-width="3.0in" />
> 						</fo:block>
> 					</fo:list-item-label>
> 					<fo:list-item-body>
> 						<fo:block>
> 							<fo:block text-align="right"
> padding-before="0.15in" font-size="14pt"
> font-weight="bold" color="#0000C0"
> vertical-align="middle">Current Out Of Stock
> Report</fo:block>
> 							<fo:block text-align="right"
> padding-before="0.0675in" font-size="9pt"
> font-weight="bold" color="gray"
> vertical-align="top">June 05, 2006 at 01:16
> PM</fo:block>
> 						</fo:block>
> 					</fo:list-item-body>
> 				</fo:list-item>
> 			</fo:list-block>


Jeremias Maerki


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