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

RE: [XSL-FO] Pagenumber

Expand Messages
  • LEvensen@iKnowMed.com
    Thanks for your greater knowledge ... From: Sebastian Rahtz [mailto:sebastian.rahtz@computing-services.oxford.ac.uk] Sent: Thursday, March 01, 2001 8:24 AM To:
    Message 1 of 10 , Mar 1 8:49 AM
    • 0 Attachment
      Thanks for your greater knowledge

      -----Original Message-----
      From: Sebastian Rahtz
      [mailto:sebastian.rahtz@...]
      Sent: Thursday, March 01, 2001 8:24 AM
      To: XSL-FO@yahoogroups.com
      Subject: RE: [XSL-FO] Pagenumber


      LEvensen@... writes:
      > It seems you've answered your own question, that is, unless you know how
      > many pages in total you will have on page 1 you can't specify '1 of 4',
      > although it doesn't stop some
      > people from putting that into specifications or such.

      oh come, its easy. replace the "4" with a page number reference to a
      label at the end of the document.

      sebastian


      To unsubscribe from this group, send an email to:
      XSL-FO-unsubscribe@egroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • hakan.lindestaf@epani.com
      This is a very good solution, but my problem is that I m looping a collection and for each item I m creating a new page-sequence. That means to be able to get
      Message 2 of 10 , Mar 1 3:08 PM
      • 0 Attachment
        This is a very good solution, but my problem is that I'm looping a
        collection and for each item I'm creating a new page-sequence. That
        means to be able to get the number of pages I have to create a blank
        page last, and I don't want that. Does anybody have a solution? Is
        there a way to prohibit blank pages to be shown? Can I create
        a "dummy" tag with only a id and put that last to get the last page
        number.

        Please help,

        /Hakan



        --- In XSL-FO@y..., Neil Bradley <neil.bradley@r...> wrote:
        >
        > You can always create a page number reference to an object that is
        > guaranteed to appear on the last page:
        >
        > ... of <fo:page-number-citation ref-id="LastParaInDocID" />.
        >
        > <fo:block id="LastParaInDocID">Hi, I'm just here so I can be
        referenced to
        > find the last page number</fo:block>
        >
        >
        > Neil.
        >
        >
        > -----Original Message-----
        > From: LEvensen@i... [mailto:LEvensen@i...]
        > Sent: 01 March 2001 16:12
        > To: XSL-FO@y...
        > Subject: RE: [XSL-FO] Pagenumber
        >
        >
        > It seems you've answered your own question, that is, unless you
        know how
        > many pages in total you will have on page 1 you can't specify '1 of
        4',
        > although it doesn't stop some
        > people from putting that into specifications or such.
        >
        > -----Original Message-----
        > From: Alicja Gacka [mailto:alg@c...]
        > Sent: Thursday, March 01, 2001 12:34 AM
        > To: XSL-FO@y...
        > Subject: [XSL-FO] Pagenumber
        >
        >
        > Hallo,
        > I have a question about pagenumber.
        > It's easy to set the pagenumber with <fo:page-number/> but I neet
        to set
        >
        > the generated pagenumber too, such es "page 1 of 4".
        > Knows anyone how can I do it, the Problem is I must generate my
        document
        >
        > dinamicaly and I don't know how meny pages it will have at the end.
        >
        > Alice
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > XSL-FO-unsubscribe@egroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
        >
        >
        > To unsubscribe from this group, send an email to:
        > XSL-FO-unsubscribe@egroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
      • Nikolai Grigoriev
        Hakan, I suggest to look at www.renderx.com/tutorial.html - for two reasons: - first, because this case is covered in Chapter XIV; - second, because the PDF
        Message 3 of 10 , Mar 1 3:22 PM
        • 0 Attachment
          Hakan,

          I suggest to look at www.renderx.com/tutorial.html - for two reasons:

          - first, because this case is covered in Chapter XIV;

          - second, because the PDF version of the tutorial itself uses the format
          of the page number that you need (Page X of Y, count restarted at the
          beginning of the page sequence). The XML source and the stylesheet
          for XSL FO are also available from the link above: please download
          and look how it was done.

          Regards,
          Nikolai Grigoriev

          RenderX


          ----- Original Message -----
          From: <hakan.lindestaf@...>
          To: <XSL-FO@yahoogroups.com>
          Sent: Friday, March 02, 2001 2:08 AM
          Subject: [XSL-FO] Re: Pagenumber


          > This is a very good solution, but my problem is that I'm looping a
          > collection and for each item I'm creating a new page-sequence. That
          > means to be able to get the number of pages I have to create a blank
          > page last, and I don't want that. Does anybody have a solution? Is
          > there a way to prohibit blank pages to be shown? Can I create
          > a "dummy" tag with only a id and put that last to get the last page
          > number.
          >
          > Please help,
          >
          > /Hakan
          >
          >
          >
          > --- In XSL-FO@y..., Neil Bradley <neil.bradley@r...> wrote:
          > >
          > > You can always create a page number reference to an object that is
          > > guaranteed to appear on the last page:
          > >
          > > ... of <fo:page-number-citation ref-id="LastParaInDocID" />.
          > >
          > > <fo:block id="LastParaInDocID">Hi, I'm just here so I can be
          > referenced to
          > > find the last page number</fo:block>
          > >
          > >
          > > Neil.
          > >
          > >
          > > -----Original Message-----
          > > From: LEvensen@i... [mailto:LEvensen@i...]
          > > Sent: 01 March 2001 16:12
          > > To: XSL-FO@y...
          > > Subject: RE: [XSL-FO] Pagenumber
          > >
          > >
          > > It seems you've answered your own question, that is, unless you
          > know how
          > > many pages in total you will have on page 1 you can't specify '1 of
          > 4',
          > > although it doesn't stop some
          > > people from putting that into specifications or such.
          > >
          > > -----Original Message-----
          > > From: Alicja Gacka [mailto:alg@c...]
          > > Sent: Thursday, March 01, 2001 12:34 AM
          > > To: XSL-FO@y...
          > > Subject: [XSL-FO] Pagenumber
          > >
          > >
          > > Hallo,
          > > I have a question about pagenumber.
          > > It's easy to set the pagenumber with <fo:page-number/> but I neet
          > to set
          > >
          > > the generated pagenumber too, such es "page 1 of 4".
          > > Knows anyone how can I do it, the Problem is I must generate my
          > document
          > >
          > > dinamicaly and I don't know how meny pages it will have at the end.
          > >
          > > Alice
          > >
          > >
          > >
          > > To unsubscribe from this group, send an email to:
          > > XSL-FO-unsubscribe@egroups.com
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          > >
          > >
          > > To unsubscribe from this group, send an email to:
          > > XSL-FO-unsubscribe@egroups.com
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >
          > To unsubscribe from this group, send an email to:
          > XSL-FO-unsubscribe@egroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
        • hakan.lindestaf@epani.com
          Thanks Nikolai, but the solution in the tutorial is exactly the same as in the message I replied to. My problem, and maybe I ve solved this in a weird way, is
          Message 4 of 10 , Mar 1 3:56 PM
          • 0 Attachment
            Thanks Nikolai,

            but the solution in the tutorial is exactly the same as in the
            message I replied to. My problem, and maybe I've solved this in a
            weird way, is that I have a collection where one item in the
            collection should be on a new page. I also want information from this
            item to be put in the static piece of that page. The subitems in the
            item can span over more than one page.

            So I created something like this:
            <!-- For each IStartHoleTeeTimes object -->
            <xsl:for-each select="/root/coll/coll_Item">
            <fo:page-sequence master-name="simple">
            <fo:title>Starter List report</fo:title>
            <fo:static-content flow-name="xsl-region-before">
            <fo:block text-align="center" font-weight="bold" font-
            size="16pt">
            Starter List - <xsl:value-of select="tcoursename"/> <xsl:value-
            of select="user:getDateString(string(ddate))"/>
            </fo:block>
            </fo:static-content>
            ...

            That means I create a new page-seq. for each item. Everything outputs
            correct, but since my outer loop is outside the page-seq. I'm not
            sure where to put the page-number-citation-id.


            Thanks,

            /Hakan






            --- In XSL-FO@y..., "Nikolai Grigoriev" <grig@r...> wrote:
            > Hakan,
            >
            > I suggest to look at www.renderx.com/tutorial.html - for two
            reasons:
            >
            > - first, because this case is covered in Chapter XIV;
            >
            > - second, because the PDF version of the tutorial itself uses the
            format
            > of the page number that you need (Page X of Y, count restarted at
            the
            > beginning of the page sequence). The XML source and the stylesheet
            > for XSL FO are also available from the link above: please download
            > and look how it was done.
            >
            > Regards,
            > Nikolai Grigoriev
            >
            > RenderX
            >
            >
          • Nikolai Grigoriev
            Hakan, ... Generate an empty termination block in each sequence, and refer to it. Use generate-id() to get a unique id, like this:
            Message 5 of 10 , Mar 1 4:13 PM
            • 0 Attachment
              Hakan,

              > That means I create a new page-seq. for each item. Everything outputs
              > correct, but since my outer loop is outside the page-seq. I'm not
              > sure where to put the page-number-citation-id.

              Generate an empty termination block in each sequence, and refer to it. Use
              generate-id() to get a unique id, like this:

              <!-- For each IStartHoleTeeTimes object -->
              <xsl:for-each select="/root/coll/coll_Item">
              <!-- Get a unigue number -->
              <xsl:variable name="end-id"
              select="concat('terminator-', generate-id())"/>

              <fo:page-sequence master-name="simple"
              initial-page-number="1"
              force-page-count="no-force">
              <fo:static-content flow-name="xsl-region-before">
              <fo:block>
              Page <fo:page-number/>
              of <fo:page-number-citation ref-id="{$end-id}"/>
              </fo:block>
              </fo:static-content>
              <fo:flow flow-name="xsl-region-body">
              ..............
              <fo:block id="{$end-id}"/>
              </fo:flow>
              </fo:page-sequence>

              (I omitted all irrelevant fragments from your sample)

              I have put force-page-count="no-force" - this is normally used with simplex
              printing. Otherwise the formatter will complement page sequences to end at even
              pages - it's another cryptic feature of XSL FO :-).

              Regards,
              Nikolai
            • hakan.lindestaf@epani.com
              Sorry but this didn t work. If I have two main items in my collection and the total pages was 7 and the first main item generated 5 pages and the last one
              Message 6 of 10 , Mar 1 4:32 PM
              • 0 Attachment
                Sorry but this didn't work. If I have two main items in my collection
                and the total pages was 7 and the first main item generated 5 pages
                and the last one generated 2 pages, the page x of y would be:
                Page 1 of 5
                Page 2 of 5
                Page 3 of 5
                Page 4 of 5
                Page 5 of 5
                Page 6 of 7
                Page 7 of 7

                But I found another way of doing this. I checked inside the page-seq.
                if I'm at the last main item in the main collection, and if I am then
                I create a dummy block with an id. It works for now, even though not
                the nicest solution.


                Thanks for all your help, I really really appreciate it!

                /Hakan



                --- In XSL-FO@y..., "Nikolai Grigoriev" <grig@r...> wrote:
                > Hakan,
                >
                > > That means I create a new page-seq. for each item. Everything
                outputs
                > > correct, but since my outer loop is outside the page-seq. I'm not
                > > sure where to put the page-number-citation-id.
                >
                > Generate an empty termination block in each sequence, and refer to
                it. Use
                > generate-id() to get a unique id, like this:
                >
                > <!-- For each IStartHoleTeeTimes object -->
                > <xsl:for-each select="/root/coll/coll_Item">
                > <!-- Get a unigue number -->
                > <xsl:variable name="end-id"
                > select="concat('terminator-', generate-id())"/>
                >
                > <fo:page-sequence master-name="simple"
                > initial-page-number="1"
                > force-page-count="no-force">
                > <fo:static-content flow-name="xsl-region-before">
                > <fo:block>
                > Page <fo:page-number/>
                > of <fo:page-number-citation ref-id="{$end-id}"/>
                > </fo:block>
                > </fo:static-content>
                > <fo:flow flow-name="xsl-region-body">
                > ..............
                > <fo:block id="{$end-id}"/>
                > </fo:flow>
                > </fo:page-sequence>
                >
                > (I omitted all irrelevant fragments from your sample)
                >
                > I have put force-page-count="no-force" - this is normally used
                with simplex
                > printing. Otherwise the formatter will complement page sequences to
                end at even
                > pages - it's another cryptic feature of XSL FO :-).
                >
                > Regards,
                > Nikolai
              Your message has been successfully submitted and would be delivered to recipients shortly.