Loading ...
Sorry, an error occurred while loading the content.

page-sequence blank and end

Expand Messages
  • Norma Yeazell
    I would like to set-up my page-sequence so that if I have 3 pages on the 3rd page it adds end of work in the footer and then adds a blank page to force an
    Message 1 of 6 , Jul 29, 2004
    • 0 Attachment
      I would like to set-up my page-sequence so that if I have 3 pages on the
      3rd page it adds "end of work" in the footer and then adds a blank page
      to force an even count.

      I have been able to do one or the other but not both. Can anyone give me
      some clues?



      Confidentiality Notice
      The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.



      [Non-text portions of this message have been removed]
    • Eliot Kimber
      ... I don t think this can be done with a single pass using XSL-FO as in the general case you have no way to know, at FO generation time, if the 3rd page will
      Message 2 of 6 , Jul 29, 2004
      • 0 Attachment
        Norma Yeazell wrote:

        > I would like to set-up my page-sequence so that if I have 3 pages on the
        > 3rd page it adds "end of work" in the footer and then adds a blank page
        > to force an even count.
        >
        > I have been able to do one or the other but not both. Can anyone give me
        > some clues?

        I don't think this can be done with a single pass using XSL-FO as in the
        general case you have no way to know, at FO generation time, if the 3rd
        page will be blank. If you knew that the 3rd page was going to be blank
        then you could generate content for that page and force a 4th blank page.

        You can do this with two-passes by examining the results of the first
        pass (for example, generating Postscript and examining the pages with a
        simple script or generating PDF and using any of the many PDF reading
        libraries to see what fell where). Ken Holman's two-pass technique for
        constructing back-of-the-book indexes can be adapted to this sort of
        task. One of my collegues has also had success using a Java XSLT
        extension to format elements *during XSLT processing* to see how many
        pages they are, examining the result, and then using that information to
        do this final formatting, all within a single XSLT pass. This is a bit
        more involved to program but seems to perform very well if you are
        formatting to PostScript (because PostScript is fast to generate and
        easy to parse with a single line-based processor, especially if all you
        need to do is count pages).

        This problem comes under the general category of "layout-driven
        formatting", problems that require the formatter to make a choice based
        on the formatting result of what came before. The two-stage nature of
        XSL-FO's abstract processing model largely precludes this type of
        processing at the FO rendering level (although the FO specification may
        be extended in the future to provide more layout-drive features).

        Cheers,

        E.
        --
        W. Eliot Kimber
        Professional Services
        Innodata Isogen
        9030 Research Blvd, #410
        Austin, TX 78758
        (512) 372-8122

        eliot@...
        www.innodata-isogen.com
      • Norma Yeazell
        Thanks at least I know it s not just me. I ll try your suggestion. ... From: Eliot Kimber [mailto:ekimber@innodata-isogen.com] Sent: Thursday, July 29, 2004
        Message 3 of 6 , Jul 29, 2004
        • 0 Attachment
          Thanks at least I know it's not just me. I'll try your suggestion.

          -----Original Message-----
          From: Eliot Kimber [mailto:ekimber@...]
          Sent: Thursday, July 29, 2004 2:05 PM
          To: XSL-FO@yahoogroups.com
          Subject: Re: [XSL-FO] page-sequence blank and end

          Norma Yeazell wrote:

          > I would like to set-up my page-sequence so that if I have 3 pages on
          the
          > 3rd page it adds "end of work" in the footer and then adds a blank
          page
          > to force an even count.
          >
          > I have been able to do one or the other but not both. Can anyone give
          me
          > some clues?

          I don't think this can be done with a single pass using XSL-FO as in the

          general case you have no way to know, at FO generation time, if the 3rd
          page will be blank. If you knew that the 3rd page was going to be blank
          then you could generate content for that page and force a 4th blank
          page.

          You can do this with two-passes by examining the results of the first
          pass (for example, generating Postscript and examining the pages with a
          simple script or generating PDF and using any of the many PDF reading
          libraries to see what fell where). Ken Holman's two-pass technique for
          constructing back-of-the-book indexes can be adapted to this sort of
          task. One of my collegues has also had success using a Java XSLT
          extension to format elements *during XSLT processing* to see how many
          pages they are, examining the result, and then using that information to

          do this final formatting, all within a single XSLT pass. This is a bit
          more involved to program but seems to perform very well if you are
          formatting to PostScript (because PostScript is fast to generate and
          easy to parse with a single line-based processor, especially if all you
          need to do is count pages).

          This problem comes under the general category of "layout-driven
          formatting", problems that require the formatter to make a choice based
          on the formatting result of what came before. The two-stage nature of
          XSL-FO's abstract processing model largely precludes this type of
          processing at the FO rendering level (although the FO specification may
          be extended in the future to provide more layout-drive features).

          Cheers,

          E.
          --
          W. Eliot Kimber
          Professional Services
          Innodata Isogen
          9030 Research Blvd, #410
          Austin, TX 78758
          (512) 372-8122

          eliot@...
          www.innodata-isogen.com




          Yahoo! Groups Links









          Confidentiality Notice
          The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.
        • J.Pietschmann
          ... I d think the even page number can be forced using force-page-count, and the end of work could get into the footer using a marker. Providing a last
          Message 4 of 6 , Jul 29, 2004
          • 0 Attachment
            Eliot Kimber wrote:

            > I don't think this can be done with a single pass using XSL-FO as in the
            > general case you have no way to know, at FO generation time, if the 3rd
            > page will be blank. If you knew that the 3rd page was going to be blank
            > then you could generate content for that page and force a 4th blank page.

            I'd think the even page number can be forced using force-page-count,
            and the "end of work" could get into the footer using a marker.
            Providing a "last" page master which doesn't retrieve the marker will
            avoid printing the mark if no blank page follows. Am I missing something
            here?

            J.Pietschmann
          • Eliot Kimber
            ... I think this would only work if the page sequence always has exactly 4 pages. If the total number of pages in the page sequence is variable then force page
            Message 5 of 6 , Jul 29, 2004
            • 0 Attachment
              J.Pietschmann wrote:

              > Eliot Kimber wrote:
              >
              > > I don't think this can be done with a single pass using XSL-FO as in the
              > > general case you have no way to know, at FO generation time, if the 3rd
              > > page will be blank. If you knew that the 3rd page was going to be blank
              > > then you could generate content for that page and force a 4th blank page.
              >
              > I'd think the even page number can be forced using force-page-count,
              > and the "end of work" could get into the footer using a marker.
              > Providing a "last" page master which doesn't retrieve the marker will
              > avoid printing the mark if no blank page follows. Am I missing something
              > here?

              I think this would only work if the page sequence always has exactly 4
              pages. If the total number of pages in the page sequence is variable
              then force page count won't help.

              I think this type of problem could be solved if XSL-FO had the ability
              condition a page master as being for "the next to last page". If you had
              that then you could have a page master that applied to blank, odd,
              next-to-last pages. I think there has been discussion in the past on
              this sort of extended conditional page master functionality.

              Cheers,

              E.
              --
              W. Eliot Kimber
              Professional Services
              Innodata Isogen
              9030 Research Blvd, #410
              Austin, TX 78758
              (512) 372-8122

              eliot@...
              www.innodata-isogen.com
            • Eliot Kimber
              ... I did a quick test and I don t think this will work at all (I had misremembered how force-page-count work. If you specify force-page-count as end-on-even
              Message 6 of 6 , Jul 29, 2004
              • 0 Attachment
                Eliot Kimber wrote:

                > J.Pietschmann wrote:
                >
                > > Eliot Kimber wrote:
                > >
                > > > I don't think this can be done with a single pass using XSL-FO as in the
                > > > general case you have no way to know, at FO generation time, if the 3rd
                > > > page will be blank. If you knew that the 3rd page was going to be blank
                > > > then you could generate content for that page and force a 4th blank page.
                > >
                > > I'd think the even page number can be forced using force-page-count,
                > > and the "end of work" could get into the footer using a marker.
                > > Providing a "last" page master which doesn't retrieve the marker will
                > > avoid printing the mark if no blank page follows. Am I missing something
                > > here?
                >
                > I think this would only work if the page sequence always has exactly 4
                > pages. If the total number of pages in the page sequence is variable
                > then force page count won't help.

                I did a quick test and I don't think this will work at all (I had
                misremembered how force-page-count work.

                If you specify force-page-count as "end-on-even" and page 2 is the last
                page with content then the end-on-even is satisfied and no blank 3rd
                page will be generated. If there is content on page 3 then the original
                use case doesn't occur.

                Cheers,

                E.
                --
                W. Eliot Kimber
                Professional Services
                Innodata Isogen
                9030 Research Blvd, #410
                Austin, TX 78758
                (512) 372-8122

                eliot@...
                www.innodata-isogen.com
              Your message has been successfully submitted and would be delivered to recipients shortly.