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 irene23 <ba...@yahoo.es> on 2008/01/02 15:46:00 UTC

attributes of

Hello,

Is there some attribute to put a block at the end of the body?

For exampe:

Text of the body.....
Text of the body...
Text of the body....



signature of seller        signature of buyer

I want to put the block of signature at the end of the body and the body can
change of size.
How can place a <block> at the end of the body?

Thanks.
-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14579395.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: attributes of

Posted by Andreas Siepert <an...@bader-jene.de>.
Hi Irene,

have a look at http://www.w3.org/TR/xsl/#d0e26492 - there you will find 
some attributes like "keep-together" helping you to solve the problem.

Greetings
Andi

irene23 schrieb:
> Thanks, 
>
> Hello, 
>
> I have a problem: 
>
> if a <fo:table> doesn,t  fit in a page, I don´t want the table is cut in two
> pages, I always want the table entire is placed together. 
>
> ¿How can I get this? (keep all the rows of the table together). 
>
>
> Thanks,
>   


-- 
Dipl.-Inf. Andreas Siepert
Entwickler

Bader & Jene Software-Ingenieurbüro GmbH
Schauenburgerstraße 116
24118 Kiel

Fon: + 49.431.5 60 66 41
Fax: + 49.431.5 60 66 44
Web: www.bader-jene.de

Ust-ID Nr: DE249078452
Amtsgericht Kiel, HRB 8298

Geschäftsführer:
Dipl.-Ing. (FH) Thomas Bader
Dipl.-Ing. (FH) Andreas Jene



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


Re: attributes of

Posted by irene23 <ba...@yahoo.es>.
Thanks, 

Hello, 

I have a problem: 

if a <fo:table> doesn,t  fit in a page, I don´t want the table is cut in two
pages, I always want the table entire is placed together. 

¿How can I get this? (keep all the rows of the table together). 


Thanks,
-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14584699.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: attributes of

Posted by irene23 <ba...@yahoo.es>.
Hello, 

I have this error: 

C:\fop-0.93>fop -xml solucion2/prueba.xml -xsl solucion2/prueba.xsl -pdf
solucio 
n2/prueba.pdf 
"java" 
03-ene-2008 13:07:01 org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement 
ADVERTENCIA: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs.
roo 
t (http://www.w3.org/1999/XSL/Format) 
03-ene-2008 13:07:01 org.apache.fop.fo.FOTreeBuilder fatalError 
GRAVE: javax.xml.transform.TransformerException:
java.lang.IndexOutOfBoundsExcep 
tion: Index: 90, Size: 90 
03-ene-2008 13:07:01 org.apache.fop.cli.Main startFOP 
GRAVE: Exception 
javax.xml.transform.TransformerException:
java.lang.IndexOutOfBoundsException: I 
ndex: 90, Size: 90 
        at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) 
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) 
        at org.apache.fop.cli.Main.startFOP(Main.java:160) 
        at org.apache.fop.cli.Main.main(Main.java:191) 

--------- 

; SystemID: file:///C:/fop-0.93/solucion2/prueba.xsl; Line#: 6; Column#: 57 
javax.xml.transform.TransformerException:
java.lang.IndexOutOfBoundsException: I 
ndex: 90, Size: 90 
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Un 
known Source) 
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Unkn 
own Source) 
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown So 
urce) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) 
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) 
        at org.apache.fop.cli.Main.startFOP(Main.java:160) 
        at org.apache.fop.cli.Main.main(Main.java:191) 
Caused by: java.lang.IndexOutOfBoundsException: Index: 90, Size: 90 
        at java.util.ArrayList.RangeCheck(Unknown Source) 
        at java.util.ArrayList.get(Unknown Source) 
        at
org.apache.fop.layoutmgr.KnuthSequence.getElement(KnuthSequence.java: 
159) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.noBreakBetween(PageBre 
akingAlgorithm.java:408) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.checkCanDeferOldFootno 
tes(PageBreakingAlgorithm.java:377) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDifference(Page 
BreakingAlgorithm.java:336) 
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(Breakin 
gAlgorithm.java:685) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(Pag 
eBreakingAlgorithm.java:309) 
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(Breakin 
gAlgorithm.java:485) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.doPhas 
e3WithLastPage(PageSequenceLayoutManager.java:411) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.doPhas 
e3(PageSequenceLayoutManager.java:366) 
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav 
a:345) 
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav 
a:263) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag 
eSequenceLayoutManager.java:157) 
        at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j 
ava:385) 
        at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java 
:148) 
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilde 
r.java:378) 
        at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) 
        at org.apache.xalan.transformer.ResultTreeHandler.endElement(Unknown
Sou 
rce) 
        at org.apache.xalan.templates.ElemLiteralResult.execute(Unknown
Source) 
        ... 10 more 
--------- 
java.lang.IndexOutOfBoundsException: Index: 90, Size: 90 
        at java.util.ArrayList.RangeCheck(Unknown Source) 
        at java.util.ArrayList.get(Unknown Source) 
        at
org.apache.fop.layoutmgr.KnuthSequence.getElement(KnuthSequence.java: 
159) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.noBreakBetween(PageBre 
akingAlgorithm.java:408) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.checkCanDeferOldFootno 
tes(PageBreakingAlgorithm.java:377) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDifference(Page 
BreakingAlgorithm.java:336) 
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(Breakin 
gAlgorithm.java:685) 
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(Pag 
eBreakingAlgorithm.java:309) 
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(Breakin 
gAlgorithm.java:485) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.doPhas 
e3WithLastPage(PageSequenceLayoutManager.java:411) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.doPhas 
e3(PageSequenceLayoutManager.java:366) 
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav 
a:345) 
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav 
a:263) 
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag 
eSequenceLayoutManager.java:157) 
        at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j 
ava:385) 
        at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java 
:148) 
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilde 
r.java:378) 
        at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) 
        at org.apache.xalan.transformer.ResultTreeHandler.endElement(Unknown
Sou 
rce) 
        at org.apache.xalan.templates.ElemLiteralResult.execute(Unknown
Source) 
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Un 
known Source) 
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Unkn 
own Source) 
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown So 
urce) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
Source 
) 
        at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) 
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) 
        at org.apache.fop.cli.Main.startFOP(Main.java:160) 
        at org.apache.fop.cli.Main.main(Main.java:191) 
C:\fop-0.93> 


If I delete "<fo:conditional-page-master-reference master-reference="cover5"
page-position="last"/>" I don´t get the error and I don´t know the cause,
Could you help me? What's the meaning of this error? 

  <fo:page-sequence-master master-name="document"> 
             <fo:repeatable-page-master-alternatives> 
               <fo:conditional-page-master-reference
master-reference="cover5" page-position="last"/>      
<fo:conditional-page-master-reference master-reference="cover6"
page-position="any"/> 
              </fo:repeatable-page-master-alternatives> 
  </fo:page-sequence-master> 

This error, I think also is related with the footnote and the attribute
keep-together I have at the end of the body:

<fo:block>Text of the body3</fo:block>
<fo:block>Text of the body3</fo:block>
					
<fo:block>	
    <fo:footnote>
	<fo:inline></fo:inline>
	      <fo:footnote-body>
		<fo:table keep-together.within-page="always" ...> .....</fo:table>  	
	      </fo:footnote-body> 
    </fo:footnote>
</fo:block>				
</fo:flow>

Could you help me to fing the problem?

Thanks.
-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14596234.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: attributes of

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 2, 2008, at 19:35, irene23 wrote:

Hi

> <snip />
> - Is this what you want to tell me? The attributes retrieve-position,
> retrieve-boundary are correct?

Yes, exactly.

>
> - But in the <fo:simple-page-master > <fo:region-after region- 
> name="footer"
> extent="1.50in"/> ..... </fo:simple-page-master> I must put a space  
> (extent)
> for the footer and all pages would have this space and I want that  
> only the
> last page have the footer signature (the rest of the pages have other
> footer, not the footer signature), so the <fo:retrieve-marker> go in
> <fo:static-content flow-name="xsl-region-after">???

Indeed, that is one of the drawbacks of the approach using fo:marker/ 
fo:retrieve-marker

In your case, it's probably a better choice to go for the approach  
using a fo:footnote, as this will always be rendered in a separate  
'static-content' between the region-body and the region-after (if any).


HTH!

Cheers

Andreas

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


Re: attributes of

Posted by irene23 <ba...@yahoo.es>.
Thank you very much and best wishes for 2008!!

<fo:static-content flow-name="xsl-region-after">
        <fo:block>
                 <fo:retrieve-marker retrieve-class-name="pieSignature"  
                               
retrieve-position="last-starting-within-page"      ¿?¿¿¿¿¿¿¿¿
                                retrieve-boundary="page" />                          
¿?¿¿¿¿¿¿¿¿
        </fo:block>
   </fo:static-content>

   <fo:flow flow-name="xsl-region-body" font="10pt Verdana">
        <fo:block> Text of the body......</fo:block>
        <fo:block> Text of the body......</fo:block>


         <fo:block>
                <fo:marker marker-class-name="pieSignature" > 
                    Signature of seller.... of buyer...
                </fo:marker>
         </fo:block>
   </fo:flow>

- Is this what you want to tell me? The attributes retrieve-position, 
retrieve-boundary are correct?

- But in the <fo:simple-page-master > <fo:region-after region-name="footer"
extent="1.50in"/> ..... </fo:simple-page-master> I must put a space (extent)
for the footer and all pages would have this space and I want that only the
last page have the footer signature (the rest of the pages have other
footer, not the footer signature), so the <fo:retrieve-marker> go in
<fo:static-content flow-name="xsl-region-after">???

Thank you very much.


-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14583590.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: attributes of

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 2, 2008, at 18:36, irene23 wrote:
>


Hi,

Since this is my first post of the year:
Best Wishes for 2008 to the whole FOP community!

Now as to your question, and Pascal's reply:

>
> I´m using xsl-region-after in this way:
>
> I have two page-masters defined, with one having a different footer  
> than the
> other.
>
> When this renders to a 2+ page document, the last page gets the  
> last footer
> and the other pages get the other footer.
>
> When it renders to a 1 page document, I get the "any" page footer,  
> even
> though
> the the page is the last page....
>
> I've posted on nabble.com, and gotten replies that it is possibly a  
> bug.
>
> So, I think I can´t use a xsl-region-after in this way. But you are  
> telling
> me that I can use xsl-region-after using
>> fo:marker/fo:retrieve-marker, (if the content depends on flow),  
>> Could you
>> tell me what is <fo:marker>?
>
> (I need put a signature, at the end of the body, in the last page -  
> not in
> any other- and if the document has only 1 page must have the  
> signature)

The idea is roughly:
You can put the signature in a single fo:marker that is attached to  
(= appears as initial descendant of) ONLY the last fo:block in the  
document.
Use a dummy block as a wrapper for the fo:marker if the body text is  
not split up in multiple blocks.
The corresponding fo:retrieve-marker will only find something to  
retrieve on the page where that last fo:block ends up. No matter  
which page-master is currently in use (you could use the same one for  
all pages).

Analogously, as Pascal suggested, the signature can be put in an  
fo:footnote that is attached to the last block.
Take care here: as opposed to an fo:marker, which has to appear as an  
initial descendant, the fo:footnote should preferably be placed  
completely at the end of the last block.
If not, then if that last block gets broken over the last two pages,  
it is possible that the footnote/signature gets rendered on the next- 
to-last page.


HTH!

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


RE: attributes of

Posted by irene23 <ba...@yahoo.es>.
Hello,

The first of all thank you very much.

I´m using xsl-region-after in this way:

I have two page-masters defined, with one having a different footer than the 
other.

When this renders to a 2+ page document, the last page gets the last footer 
and the other pages get the other footer.

When it renders to a 1 page document, I get the "any" page footer, even
though 
the the page is the last page....

I've posted on nabble.com, and gotten replies that it is possibly a bug.

So, I think I can´t use a xsl-region-after in this way. But you are telling
me that I can use xsl-region-after using
> fo:marker/fo:retrieve-marker, (if the content depends on flow), Could you
> tell me what is <fo:marker>?

(I need put a signature, at the end of the body, in the last page - not in
any other- and if the document has only 1 page must have the signature)



Thanks


Snippet of the code:

<fo:layout-master-set> 
  <fo:simple-page-master master-name="default-page" 
                         page-height="11in" 
                         page-width="8.50in" 
                         margin-top="0.25in" 
                         margin-left="0.25in" 
                         margin-right="0.25in" 
                         margin-bottom="0.25in"> 
<!-- space needed for header & footer tables --> 
  <fo:region-body           
   region-name="body" 
   margin-top="0in" 
                         margin-bottom="1.50in"/> 
  <fo:region-before region-name="header" extent="10.0in"/> <!-- space needed 
for header table --> 
  <fo:region-after region-name="footer" extent="1.50in"/> <!-- space needed 
for footer table --> 
  <fo:region-start  extent="0.00in"/> 
  <fo:region-end    extent="0.00in"/> 
  </fo:simple-page-master> 
  
  
  <fo:simple-page-master master-name="last-page" 
   page-height="11in" 
   page-width="8.50in" 
   margin-top="0.25in" 
   margin-left="0.25in" 
   margin-right="0.25in" 
   margin-bottom="0.25in"> 
   <!-- space needed for header & footer tables --> 
   <fo:region-body           
    region-name="body" 
    margin-top="0in" 
    margin-bottom="1.50in"/> 
   <fo:region-before region-name="header" extent="10.0in"/> <!-- space
needed 
for header table --> 
   <fo:region-after  region-name="last-footer" extent="1.50in"/> <!-- space 
needed for footer table --> 
   <fo:region-start  extent="0.00in"/> 
   <fo:region-end    extent="0.00in"/> 
  </fo:simple-page-master> 
  
  
  <fo:page-sequence-master master-name="all"> 
   <fo:repeatable-page-master-alternatives> 

    <fo:conditional-page-master-reference 
     page-position="last" master-reference="last-page"/> 
    
    <fo:conditional-page-master-reference 
     page-position="any" master-reference="default-page" /> 

   </fo:repeatable-page-master-alternatives> 
  </fo:page-sequence-master> 
 </fo:layout-master-set>
-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14582395.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: attributes of

Posted by irene23 <ba...@yahoo.es>.
Hello,

The first of all thank you very much. But I have two problems:

1.- - If I use a xsl-region-after, I need use two page-masters, with one
having a different footer than the 
other. (because the signature only must appear in the last page)

    <fo:conditional-page-master-reference 
     page-position="last" master-reference="last-page"/> 
    
    <fo:conditional-page-master-reference 
     page-position="any" master-reference="default-page" /> 

This have a problem: When it renders to a 1 page document, I get the "any"
page footer, even though 
the the page is the last page....

This must be a bug of apache FOP, so this first solution I think can`t use.

2.- If I use footnote I`m doing the next:

<fo:block>text of the body</fo:block>
 <fo:block>text of the body</fo:block>
 <fo:block>text of the body</fo:block>
 <fo:block>text of the body</fo:block>
 <fo:block>	
  <fo:footnote >
	 <fo:inline></fo:inline>
	 <fo:footnote-body>
	     <xsl:call-template name="last_footer"></xsl:call-template>
	 </fo:footnote-body> 
  </fo:footnote>
</fo:block>

As you see in the code before I´m using a footnote at the end of the body
(following the text of the body) but when the body is filled the footnote is
placed at the beginnig of the page (not at the end) or the footnote is cut.

¿Am I using the <footnote> correctly? ¿Is there something to the footnote
isn´t cut?


Thanks.







Pascal Sancho wrote:
> 
> Hi,
> 
> 
> You can try 2 options:
> - either put the fo:block in a static region (xsl-region-after) -- using
> fo:marker/fo:retrieve-marker, if the content depends on flow)
> - or use footnotes
> 
> Perhaps somebody have another solution.
> 
> HTH, 
> Pascal
> 
>> -----Message d'origine-----
>> De : irene23 [mailto:basura2400@yahoo.es] 
>> Envoyé : mercredi 2 janvier 2008 15:46
>> À : fop-users@xmlgraphics.apache.org
>> Objet : attributes of <block>
>> 
>> 
>> Hello,
>> 
>> Is there some attribute to put a block at the end of the body?
>> 
>> For exampe:
>> 
>> Text of the body.....
>> Text of the body...
>> Text of the body....
>> 
>> 
>> 
>> signature of seller        signature of buyer
>> 
>> I want to put the block of signature at the end of the body 
>> and the body can
>> change of size.
>> How can place a <block> at the end of the body?
>> 
>> Thanks.
>> -- 
>> View this message in context: 
>> http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p145
>> 79395.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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/attributes-of-%3Cblock%3E-tp14579395p14582175.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