xsl-list
[Top] [All Lists]

FW: FW: XSL-FO print of static area at end

2006-03-03 03:54:34


-----Original Message-----
From: Linda Burgess 
Sent: Friday, March 03, 2006 12:52 PM
To: Linda Burgess
Subject: FW: XSL-FO print of static area at end 

Hi

Thank you for the advice given:

“I used (2) and (3) to get the effect you want,
and the code below works in both Antenna House
and RenderX.  Just add the below to your page
geometry for a test, changing the names of the master-reference= masters.

I put a fixed-height block-container into a
footnote, thus the top edge of the blocks in the
block container would be your tear-off line
(shown below as a dotted line).  The blocks flow
from the top of the block container.”

I am currently using Apache FOP 0.20.5, running on a Linux box, rendering a PDF 
document, and suspect that this information will change the character of this 
problem.

Using the code you have supplied, as is, does not print any footnote at all.  
After playing around, I managed to print a footnote, only when I include 
‘vertical-align="super"’ with the inline, it does not seem to like a ‘blank’ 
inline.  I used a very small font, with a “.”, which will hardly be visible on 
the final document.

<fo:block font-size="10pt">
 <fo:footnote>
  <fo:inline font-size="1pt" vertical-align="super"> .</fo:inline>
  <fo:footnote-body>
   <fo:block>
    <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
    <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
    <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
   </fo:block>
  </fo:footnote-body>
 </fo:footnote> 
</fo:block>   

Unfortunately, this solution does not work under all circumstances. The 
scenario I have tested, is to make my output just one page long, without 
leaving enough space for the full footnote to print.  As I understand, the 
footnote should then print at the bottom of the next page (which will be a 
blank page), but this does not happen.  In this case, no footnote is printed at 
all.  If I include a blank block at the end with a page break, then the 
footnote does print at the end of the next (blank) page.  Unfortunately, this 
will sometimes render an unnecessary blank page at the end of the document and 
is not the solution.

<fo:layout-master-set>
  <fo:simple-page-master master-name="document"
    page-height="297mm"
    page-width="210mm"
    margin-top="10mm"
    margin-left="10mm"
    margin-right="10mm">
    <fo:region-before region-name="rest-header" extent="30mm"/>
    <fo:region-body margin-top="25mm"
                    margin-bottom="10mm"
                    font-size="10pt"
                    font-family="Times New Roman"/>
    <fo:region-after extent="5in"/>
  </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="document">  
 <fo:flow flow-name="xsl-region-body" font-size="50pt">
    <fo:block space-after="10pt"> This is a test </fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
     <!-If these two lines are also commented out the footnote prints at end of 
first page →
    <fo:block>Blocks of the first group</fo:block>
    <fo:block>Blocks of the first group</fo:block>
    <!-- *** If this is not commented out the footnote prints at end of second 
page
             With this commented out the footnote does not print at all
       <fo:block>Blocks of the first group</fo:block>
      <fo:block>Blocks of the first group</fo:block>
      <fo:block>Blocks of the first group</fo:block -->
     <fo:block font-size="10pt">  
         <fo:footnote>
            <fo:inline font-size="1pt" vertical-align="super"> .</fo:inline>
            <fo:footnote-body>        
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
          </fo:footnote-body>
         </fo:footnote> 
       </fo:block>   

<!-If this is included the footnote does print at the end of the next page
       <fo:block break-before="page"> </fo:block>  →
 </fo:flow>


In connection with your suggestion to use a block-container, I get the 
following error:

“(org(_dot_)apache(_dot_)fop(_dot_)apps(_dot_)XSLTInputHandler(_at_)1ea2fa6)
javax.servlet.ServletException: java.lang.ClassCastException” 

with the following:

<fo:block>  
         <fo:footnote>
            <fo:inline font-size="1pt" vertical-align="super"> .</fo:inline>
            <fo:footnote-body> 
             <fo:block-container height="4in">       
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             </fo:block-container>
          </fo:footnote-body>
         </fo:footnote> 
       </fo:block>   


I do not get the error with the following, but then I do not get a footnote 
either.

<fo:block>  
         <fo:footnote>
            <fo:inline> </fo:inline>
            <fo:footnote-body> 
             <fo:block-container height="4in">       
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             <fo:block> <fo:inline>yyyy </fo:inline> </fo:block>
             </fo:block-container>
          </fo:footnote-body>
         </fo:footnote> 
       </fo:block>  

All help will be greatly appreciated.

Thank you
Linda Burgess 
 



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>