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 Moreschi Lucio <l....@csb.it> on 2006/02/10 12:23:51 UTC

Problem on use of more pages

Hi all,

 

I am using FOP 0.20.5 in order to create PDF documents ( for example
invoices) I have this problem:

 

When the line number of my document is higher than the one that can be
included in the page of PDF document, Apache  doesn't change page and
the remaining lines are not shown anymore. 

I made some tests and I understand that the problem is caused from the
use of the fo:blok-container rather of fo:block

I want to use container. Can anybody help me?

Thanks in advance Lucio 

 

Here you can find a source sample I use for my tests

  <xsl:template match="/">

      <fo:root>

         <fo:layout-master-set>

            <fo:simple-page-master master-name="doc" page-width="210mm" 

                        page-height="296mm" margin-top="10mm"
margin-bottom="5mm" margin-left="5mm" 

                        margin-right="5mm">

                <fo:region-before region-name="areaHeader"
extent="0mm"/>

 

               <fo:region-body region-name="areaBody" margin-top="0mm"/>

            </fo:simple-page-master>

         </fo:layout-master-set>

 

         <fo:page-sequence master-reference="doc"
initial-page-number="1"                                   

force-page-count="no-force" country="it" language="it">

     

            <fo:static-content flow-name="areaHeader" >

               <xsl:call-template name="templateHeader"/>

            </fo:static-content>

 

 

            <fo:flow flow-name="areaBody">               

               <xsl:call-template name="templateBody"/>     

            </fo:flow>

         </fo:page-sequence>

      </fo:root>

   </xsl:template>

  

   <xsl:template name="templateBody"> 

      <fo:block-container height="170mm" width="200mm" top="110mm"
position="absolute">

         <fo:block-container font-size="9pt" height="120mm"
width="200mm" position="absolute">

            <fo:table table-layout="fixed">

....

.... 

       <!-- When the number of lines is higher than page it doesn't make
the page break  and the remaining lines are not shown --> 

            </fo:table>

         </fo:block-container>

      </fo:block-container>

   </xsl:template>

</xsl:stylesheet>

 

 

 


Re: Problem on use of more pages

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 10.02.2006 19:31:12 Moreschi Lucio wrote:
> Now I am a little worried  

You should be. You invested a lot of work in the wrong direction and
used XSL-FO like it were a desktop publishing system. But it's not.

> I have used the block-containers because a good method for job seemed me
> (type Chinese boxes) to manage areas with edges, with background-color
> etc.  

Tables do a fine job for that. Get rid of the fo:block-containers. Use
absolutely positioned block-containers only if you need to absolutely
position something on one (!) page.

> It is better that I attach everything of my file of test to make to
> understand you what I intend to do.  

Well, the stylesheet alone doesn't help much. Without an example XML
file I cannot even run it through FOP to see what the result would look
like.

<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: Problem on use of more pages

Posted by Chris Bowditch <bo...@hotmail.com>.
Moreschi Lucio wrote:

> Hi all,
> 
>  
> 
> I am using FOP 0.20.5 in order to create PDF documents ( for example 
> invoices) I have this problem:
> 
>  
> 
> When the line number of my document is higher than the one that can be 
> included in the page of PDF document, Apache  doesn’t change page and 
> the remaining lines are not shown anymore.
> 
> I made some tests and I understand that the problem is caused from the 
> use of the fo:blok-container rather of fo:block

Thats right. The XSL-FO specification dictates the behaviour of 
Block-Container.

> 
> I want to use container. Can anybody help me?

Why do think you need block-container? In FOP 0.20.5, the primary use of 
Block-Container is to absolutely position a piece of text on a page.

<snip/>

>    <xsl:template name="templateBody">
> 
>       <fo:block-container height="170mm" width="200mm" top="110mm" 
> position="absolute">

Why not use margins on the region body to give the same effect? From 
your sample it looks like you'll be able to achieve what you want by 
using margins on a region body.

> 
>          <fo:block-container font-size="9pt" height="120mm" 
> width="200mm" position="absolute">
> 

<snip/>

Chris



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


Re: Problem on use of more pages

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Question back: Why do you want to use block-container? Why can't you
just leave the fo:table as a direct child of fo:flow or of an fo:block?

Look at the XSL-FO specification, chapter 7.5.1, the "absolute-position"
property: "Absolutely positioned areas are taken out of the normal flow.
This means they have no impact on the layout of later siblings." And
that means that they don't break at the end of a page and continue on
the next.

Tell us what you're trying to accomplish and we can tell you how best to
do that.

On 10.02.2006 12:23:51 Moreschi Lucio wrote:
> Hi all,
> 
>  
> 
> I am using FOP 0.20.5 in order to create PDF documents ( for example
> invoices) I have this problem:
> 
>  
> 
> When the line number of my document is higher than the one that can be
> included in the page of PDF document, Apache  doesn't change page and
> the remaining lines are not shown anymore. 
> 
> I made some tests and I understand that the problem is caused from the
> use of the fo:blok-container rather of fo:block
> 
> I want to use container. Can anybody help me?
> 
> Thanks in advance Lucio 
> 
>  
> 
> Here you can find a source sample I use for my tests

<snip/>


Jeremias Maerki


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