Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Empty lines Strike-out

From: "G. Ken Holman" <gkholman@-------------------->
To:
Date: 5/1/2004 5:03:00 AM
At 2004-05-01 08:35 +0200, GAIAJPATHY S wrote:
   We have a problem in generating the Pdf using the XSL:FO, we need to
strike out the last page's empty lines if exists.

There are no such contingencies in XSL-FO for "do empty lines exist?".



For eg., if the last page
occupuies the 3/4th page we need to stikeout the 1/4 the page. How we can do
that in the XSL-FO?.

By thinking about backgrounds.



Is there any way we can find out relative position where we are in the page,

No.



If this can be achieved i think we can dynamically
include the image with a diagonal line. OR any other soultion u have please
do help us.

All I can think of is the following two steps:



  (1) - create a background illustrating the strike-out region of the page 
for the full size of body region of the last page (in my example below I'm 
just using a silver background colour ... you would probably want to use a 
hash line graphic of some kind)



  (2) - wrap all of the flow in a block whose background is white



Then as the formatter has flow, the region-wide surrounding block with the 
white background obscures the body-region's background ... but this stops 
when the flow stops and the remainder of the page reveal the background 
which will be your hashed line example.



If you are using break-before="page" in your flow then you can only use the 
background image in a conditional page master tested for the last page of 
the page sequence.  If your entire document is simple flow, then it can be 
the background image for every page.



The example below works with both Antenna House and RenderX.



I hope this helps.



................ Ken



<?xml version="1.0" encoding="utf-8"?><!--gaiajpathy.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
      font-family="Times" font-size="20pt">

  <layout-master-set>
    <simple-page-master master-name="frame"
                        page-height="297mm" page-width="210mm"
                        margin-top="15mm" margin-bottom="15mm"
                        margin-left="15mm" margin-right="15mm">
      <region-body region-name="frame-body" background="silver"/>
    </simple-page-master>
  </layout-master-set>

  <page-sequence master-reference="frame">



<flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="frame-body"
      font-family="Times" font-size="20pt">

  <block background-color="white">
    <block>This is a test</block>
    <block start-indent="2in" end-indent=".5in" space-before=".5in">
      This is a test
    </block>
  </block>

</flow>
</page-sequence>
</root>


--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Each week:   Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO

Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18



World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent