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 Robert Raposa <ro...@yahoo.com> on 2003/05/22 22:28:56 UTC

Nested Blocks Seem to Take Up Space

Using FOP 0.20.4.

I have created a page-master with a certain width and height (768 x 1024)
and no margins.  I tried to fill this page with an image (PNG) - also of
size 768 x 1024.  If the image is enclosed in exactly one block - it works
fine.  However - if the image is enclosed inside of two blocks - a second
page appears in my report that is completely blank.

As can be seen in my example below - I tried setting all kinds of attributes
on the block tags to "0px" just to see if this would help the situation -
but it didn't.

Also - it seems that if I leave the width at 1024 - but shrink the height of
the image to a maximum of 751 - the blank page will disappear.

Any thoughts as to what is going on here?  Thanks!

A quick side question.  The purpose of the outer block was originally to set
up some default attributes for my document.  I read somewhere that these
could actually be placed inside fo:root instead.  Unfortunately - I was
unable to make this work.  Can anyone confirm or deny that this should work?
Do you know of any documentation on this?

Thanks again for any help on this!

Sample FO included below.  Note: it refers to a .PNG file that was saved at
768 x 1024 (chart.png).  I was cautioned away from including attachments -
so I didn't include this.  Hope that's not an issue.

-----------------------------------------------------

<fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format'>

<fo:layout-master-set>
   <!-- 1024 px x 768 px report, for Final Graphs Presentation.  No
margin. -->
   <fo:simple-page-master master-name="FinalGraphsPage" margin="0px"
page-height="768px" page-width="1024px">
	   <fo:region-body margin-left="0in" margin-bottom="0in" margin-right="0in"
margin-top="0in"/>
   </fo:simple-page-master>
</fo:layout-master-set>

<!-- Test Report -->

<!-- Final Graph #1 - Max Working Height=751 of 768-->

<fo:page-sequence xmlns:fo="http://www.w3.org/1999/XSL/Format"
master-reference="FinalGraphsPage">
<fo:flow flow-name="xsl-region-body">
<fo:block space-before="0px" space-after="0px" margin="0px"
text-indent="0px" padding="0px">
	<fo:block text-indent="0px" padding="0px" space-before="0px"
space-after="0px" margin="0px"><fo:external-graphic  src='url(C:\chart.png)'
width='1024px' height='768px'  /></fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>

</fo:root>



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


Re: Nested Blocks Seem to Take Up Space

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Robert Raposa wrote:
> I have created a page-master with a certain width and height (768 x 1024)
> and no margins.  I tried to fill this page with an image (PNG) - also of
> size 768 x 1024.  If the image is enclosed in exactly one block - it works
> fine.  However - if the image is enclosed inside of two blocks - a second
> page appears in my report that is completely blank.
> 
> As can be seen in my example below - I tried setting all kinds of attributes
> on the block tags to "0px" just to see if this would help the situation -
> but it didn't.
> 
> Also - it seems that if I leave the width at 1024 - but shrink the height of
> the image to a maximum of 751 - the blank page will disappear.
> 
> Any thoughts as to what is going on here?  Thanks!

I have yet to check but it seems somehow the space usually
inserted before a line (so called half-leading) is added.
Check whether setting font-size="0pt" or/and line-hight="0pt"
fixes this.
>
> A quick side question.  The purpose of the outer block was originally to set
> up some default attributes for my document.  I read somewhere that these
> could actually be placed inside fo:root instead.  Unfortunately - I was
> unable to make this work.  Can anyone confirm or deny that this should work?

For most properties search stops a page-sequence, or perhaps
at the flow. Try to add your properties there.

> Do you know of any documentation on this?
Use the source Luke!

> src='url(C:\chart.png)'
BTW that's a filename, not a proper URL.

J.Pietschmann



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