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 nmwp <ni...@wp.pl> on 2008/02/14 14:41:02 UTC

Is this a bug?

Hi

As I just know fop since 2 days, I'm not sure if this is a bug... can
someone check if it is. Just render the lower fo. The biggest bug is that
lower table with 2 rows as the fo specifies only 1 row.

-- nwp



<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="29.7cm"
page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2.5cm"
margin-right="2.5cm">
        <fo:region-body margin-top="3cm"/>
        <fo:region-before extent="3cm"/>
        <fo:region-after extent="1.5cm"/>
    </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="simple">

    <fo:flow flow-name="xsl-region-body">
		
			<fo:block width="2cm">BUG: this block should have 2cm in width</fo:block>
			<fo:block> </fo:block>
			
			<fo:block-container z-index="1" position="absolute" left="0cm" top="1cm"
overflow="hidden">
				<fo:block width="2cm">BUG: this block is inside a block-container and it
should have 2cm in width</fo:block>
			</fo:block-container>

			<fo:block space-before="2cm">
				<fo:table table-layout="fixed" width="100%">
						<fo:table-column column-width="1cm" column-number="1"/>
						<fo:table-column column-width="7cm" column-number="2"/>
						<fo:table-column column-width="1cm" column-number="3"/>
						<fo:table-column column-width="7cm" column-number="4"/>
						<fo:table-column column-width="1cm" column-number="5"/>
						<fo:table-body>
							<fo:table-row>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block>some short text</fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block >OK!!! table out of block-container...!!! some very long
text doesn't cause some magic...</fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
				</fo:table>
			</fo:block>				

			<fo:block-container z-index="1" position="absolute" left="0cm" top="5cm"
overflow="hidden">
				<fo:block>
					<fo:table table-layout="fixed" width="100%">
						<fo:table-column column-width="1cm" column-number="1"/>
						<fo:table-column column-width="7cm" column-number="2"/>
						<fo:table-column column-width="1cm" column-number="3"/>
						<fo:table-column column-width="7cm" column-number="4"/>
						<fo:table-column column-width="1cm" column-number="5"/>
						<fo:table-body>
							<fo:table-row>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block>some short text</fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block background-color="silver">BUG!!! table inside
block-container. Some very long text that cause some magic and creates
second row</fo:block>
								</fo:table-cell>
								<fo:table-cell border="1px solid black">
									<fo:block> </fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</fo:block>				
			</fo:block-container>
    </fo:flow>
</fo:page-sequence>

</fo:root>
-- 
View this message in context: http://www.nabble.com/Is-this-a-bug--tp15480346p15480346.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: Is this a bug?

Posted by David Ilsley <di...@mango-solutions.com>.
Vincent Hennebert <vincent.hennebert <at> anyware-tech.com> writes:

> 
> Hi,
> 
> nmwp wrote:
> > Hi
> > 
> > As I just know fop since 2 days, I'm not sure if this is a bug... can
> > someone check if it is. Just render the lower fo. The biggest bug is that
> > lower table with 2 rows as the fo specifies only 1 row.
> > 
> > -- nwp
> > 		
> >   <fo:block width="2cm">BUG: this block should have 2cm in width</fo:block>
> 
> “width” doesn’t apply to fo:block. You must do something like the 
> following:
>     <fo:block-container width="2cm">
>       <fo:block>this block will have a width of 2cm</fo:block>
>     </fo:block-container>
> 
> HTH,
> Vincent

Hi,

I am using 0.94 (and have tried 0.95 beta) to output a block with a width to PDF
and RTF:
<fo:block-container width="2cm">
  <fo:block>this block will have a width of 2cm</fo:block>
</fo:block-container>

This works in PDF, but not in RTF - does anyone else have this problem?

Thanks,

Dave



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


Re: Is this a bug?

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

nmwp wrote:
> Hi
> 
> As I just know fop since 2 days, I'm not sure if this is a bug... can
> someone check if it is. Just render the lower fo. The biggest bug is that
> lower table with 2 rows as the fo specifies only 1 row.
> 
> -- nwp
<snip/>
> 		
>   <fo:block width="2cm">BUG: this block should have 2cm in width</fo:block>

“width” doesn’t apply to fo:block. You must do something like the 
following:
    <fo:block-container width="2cm">
      <fo:block>this block will have a width of 2cm</fo:block>
    </fo:block-container>

>   <fo:block-container z-index="1" position="absolute" left="0cm" top="1cm" overflow="hidden">
>     <fo:block width="2cm">BUG: this block is inside a block-container and it
>       should have 2cm in width</fo:block>
>   </fo:block-container>

Same here, move the width="2cm" to the enclosing block-container.

<snip/>
>   <fo:block-container z-index="1" position="absolute" left="0cm" 
>     top="5cm"
>     overflow="hidden">
>     <fo:block>
>       <fo:table table-layout="fixed" width="100%">
>         <fo:table-column column-width="1cm" column-number="1"/>
>         <fo:table-column column-width="7cm" column-number="2"/>
>         <fo:table-column column-width="1cm" column-number="3"/>
>         <fo:table-column column-width="7cm" column-number="4"/>
>         <fo:table-column column-width="1cm" column-number="5"/>
>         <fo:table-body>
>           <fo:table-row>
>             <fo:table-cell border="1px solid black">
>               <fo:block> </fo:block>
>             </fo:table-cell>
>             <fo:table-cell border="1px solid black">
>               <fo:block>some short text</fo:block>
>             </fo:table-cell>
>             <fo:table-cell border="1px solid black">
>               <fo:block> </fo:block>
>             </fo:table-cell>
>             <fo:table-cell border="1px solid black">
>               <fo:block background-color="silver">BUG!!! table inside
>                 block-container. Some very long text that cause some magic and creates
>                 second row</fo:block>
>             </fo:table-cell>
>             <fo:table-cell border="1px solid black">
>               <fo:block> </fo:block>
>             </fo:table-cell>
>           </fo:table-row>
>         </fo:table-body>
>       </fo:table>
>     </fo:block>				
>   </fo:block-container>

This is due to a bug in the handling of block-containers which was fixed 
recently in the Trunk. Meanwhile setting keep-together="always" on the 
table avoids the problem.

HTH,
Vincent


--
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

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


RE: Is this a bug?

Posted by Steve Protulipac <sp...@acclamation.com>.
I've also encountered the problem with long content in a table cell
causing an unexpected row to be generated.

After some experimentation, I was able to work around the problem by
adding keep-together="always" to the fo:table-row.  Maybe that will
help, if you are able to manipulate the FO.

Steve

-----Original Message-----
From: nmwp [mailto:nightmarcus@wp.pl] 
Sent: Thursday, February 14, 2008 8:41 AM
To: fop-users@xmlgraphics.apache.org
Subject: Is this a bug?


Hi

As I just know fop since 2 days, I'm not sure if this is a bug... can
someone check if it is. Just render the lower fo. The biggest bug is
that
lower table with 2 rows as the fo specifies only 1 row.

-- nwp



<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="29.7cm"
page-width="21cm" margin-top="2cm" margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
        <fo:region-body margin-top="3cm"/>
        <fo:region-before extent="3cm"/>
        <fo:region-after extent="1.5cm"/>
    </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="simple">

    <fo:flow flow-name="xsl-region-body">
		
			<fo:block width="2cm">BUG: this block should
have 2cm in width</fo:block>
			<fo:block> </fo:block>
			
			<fo:block-container z-index="1"
position="absolute" left="0cm" top="1cm"
overflow="hidden">
				<fo:block width="2cm">BUG: this block is
inside a block-container and it
should have 2cm in width</fo:block>
			</fo:block-container>

			<fo:block space-before="2cm">
				<fo:table table-layout="fixed"
width="100%">
						<fo:table-column
column-width="1cm" column-number="1"/>
						<fo:table-column
column-width="7cm" column-number="2"/>
						<fo:table-column
column-width="1cm" column-number="3"/>
						<fo:table-column
column-width="7cm" column-number="4"/>
						<fo:table-column
column-width="1cm" column-number="5"/>
						<fo:table-body>
							<fo:table-row>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block>some short text</fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block >OK!!! table out of block-container...!!! some very long
text doesn't cause some magic...</fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
				</fo:table>
			</fo:block>				

			<fo:block-container z-index="1"
position="absolute" left="0cm" top="5cm"
overflow="hidden">
				<fo:block>
					<fo:table table-layout="fixed"
width="100%">
						<fo:table-column
column-width="1cm" column-number="1"/>
						<fo:table-column
column-width="7cm" column-number="2"/>
						<fo:table-column
column-width="1cm" column-number="3"/>
						<fo:table-column
column-width="7cm" column-number="4"/>
						<fo:table-column
column-width="1cm" column-number="5"/>
						<fo:table-body>
							<fo:table-row>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block>some short text</fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block background-color="silver">BUG!!! table inside
block-container. Some very long text that cause some magic and creates
second row</fo:block>
	
</fo:table-cell>
	
<fo:table-cell border="1px solid black">
	
<fo:block> </fo:block>
	
</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</fo:block>				
			</fo:block-container>
    </fo:flow>
</fo:page-sequence>

</fo:root>
-- 
View this message in context:
http://www.nabble.com/Is-this-a-bug--tp15480346p15480346.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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