XSL:FO - How to identify the last word in a page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • J5883
    New Member
    • Jan 2015
    • 2

    XSL:FO - How to identify the last word in a page

    I am creating numerous pdf letters . I do not want the part of the signature to go to the next page or the signature alone to go to the next page.

    eg:

    Yours sincerely
    J

    I do not want Yours Sincerley to be the last word of a page and J in the next page or Yours sincerely J to be a stand alone of a page. in both scenarios i would need to apply for a page break.

    will checking for position() = last() help , or there is more specific method for xsl:fo?

    Thanks
    J
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    what you’re looking for is the widows property.

    Comment

    • J5883
      New Member
      • Jan 2015
      • 2

      #3
      Okay , I just read about the property , but i am not sure how it has to be implemented in my case. Explaining it in detail .

      First Page
      <fo:block>som e text 1</fo:block>
      <fo:block>som e text 2</fo:block>
      <fo:block>som e text 3</fo:block>
      <fo:block>som e text 4</fo:block>

      Second Page
      <fo:block>You rs sincerely</fo:block>
      <fo:block>signa ture text 1</fo:block>
      <fo:block>signa ture text 2</fo:block>
      <fo:block>signa ture text 3</fo:block>

      So whenever i have my second page starting with any of the mentioned above blocks , I need to add a break in <fo:block>som e text 4</fo:block>, so that now the signature part is not a stand alone , but comes with a paragraph.

      Can this be implemented with widows property ?

      Thanks!

      Comment

      Working...