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

Re: [XSL-FO] Page numbers int multidocument files

Expand Messages
  • J.Pietschmann
    ... See http://xml.apache.org/fop/fo.html#fo-total-pages J.Pietschmann
    Message 1 of 11 , Jan 7, 2005
    • 0 Attachment
      Jørgen Romark wrote:
      > How can I get pagenumbering type "page n of y" where first page for each
      > customer starts with 1 and y is the last page for that customer in one
      > single pdf file?

      See
      http://xml.apache.org/fop/fo.html#fo-total-pages

      J.Pietschmann
    • Dave Pawson
      ... http://www.dpawson.co.uk/xsl/sect3/N8703.html#d11542e31 HTH -- Regards, Dave Pawson XSLT + Docbook FAQ http://www.dpawson.co.uk
      Message 2 of 11 , Jan 8, 2005
      • 0 Attachment
        On Fri, 2005-01-07 at 14:17 +0100, Jørgen Romark wrote:
        >
        > I have a XML file with bills to all my customers.
        > How can I get pagenumbering type "page n of y" where first page for each
        > customer starts with 1 and y is the last page for that customer in one
        > single pdf file?
        > Appreciate all help and hints!

        http://www.dpawson.co.uk/xsl/sect3/N8703.html#d11542e31


        HTH


        --
        Regards,

        Dave Pawson
        XSLT + Docbook FAQ
        http://www.dpawson.co.uk
      • jromark
        ... for each ... in one ... Thank you for your hint, Dave. Your code makes every bill start with page number = 1, but does it show the correct number of pages
        Message 3 of 11 , Jan 9, 2005
        • 0 Attachment
          --- In XSL-FO@yahoogroups.com, Dave Pawson <DaveP@d...> wrote:
          > On Fri, 2005-01-07 at 14:17 +0100, Jørgen Romark wrote:
          > >
          > > I have a XML file with bills to all my customers.
          > > How can I get pagenumbering type "page n of y" where first page
          for each
          > > customer starts with 1 and y is the last page for that customer
          in one
          > > single pdf file?
          > > Appreciate all help and hints!
          >
          > http://www.dpawson.co.uk/xsl/sect3/N8703.html#d11542e31
          >
          >
          > HTH
          >
          >
          > --
          > Regards,
          >

          > Dave Pawson
          > XSLT + Docbook FAQ
          > http://www.dpawson.co.uk

          Thank you for your hint, Dave.
          Your code makes every bill start with page number = 1, but does it
          show the correct number of pages in the specific bill? My problem is
          that I get the total number of pages in the document.

          Regards
          Jørgen Romark
        • Dave Pawson
          ... Which is what s normally wanted. I wasn t sure. Bottom line, there is no real feedback from the formatter to the XSLT stage then. Hence you can t start
          Message 4 of 11 , Jan 10, 2005
          • 0 Attachment
            On Mon, 2005-01-10 at 07:11 +0000, jromark wrote:

            >
            > Thank you for your hint, Dave.
            > Your code makes every bill start with page number = 1, but does it
            > show the correct number of pages in the specific bill? My problem is
            > that I get the total number of pages in the document.

            Which is what's normally wanted. I wasn't sure.

            Bottom line, there is no 'real' feedback from the formatter
            to the XSLT stage then.

            Hence you can't start counting

            1.... a.....b.....c

            such that a=>1
            b=> b-a etc.

            Try me again with your requirement please.
            Looks like I didn't understand it.


            --
            Regards,

            Dave Pawson
            XSLT + Docbook FAQ
            http://www.dpawson.co.uk
          • J.Pietschmann
            ... A FAQ of some sorts. See http://xml.apache.org/fop/faq.html#fo-total-pages J.Pietschmann
            Message 5 of 11 , Jan 10, 2005
            • 0 Attachment
              jromark wrote:
              > Your code makes every bill start with page number = 1, but does it
              > show the correct number of pages in the specific bill? My problem is
              > that I get the total number of pages in the document.

              A FAQ of some sorts. See
              http://xml.apache.org/fop/faq.html#fo-total-pages

              J.Pietschmann
            • jromark
              ... it ... is ... Sorry bout the unclearity! Problem: My pdf document (65 pages) contain 20 bills. Most bills goes over several pages. Each bill should be
              Message 6 of 11 , Jan 10, 2005
              • 0 Attachment
                --- In XSL-FO@yahoogroups.com, Dave Pawson <DaveP@d...> wrote:
                > On Mon, 2005-01-10 at 07:11 +0000, jromark wrote:
                >
                > >
                > > Thank you for your hint, Dave.
                > > Your code makes every bill start with page number = 1, but does
                it
                > > show the correct number of pages in the specific bill? My problem
                is
                > > that I get the total number of pages in the document.
                >
                > Which is what's normally wanted. I wasn't sure.
                >
                > Bottom line, there is no 'real' feedback from the formatter
                > to the XSLT stage then.
                >
                > Hence you can't start counting
                >
                > 1.... a.....b.....c
                >
                > such that a=>1
                > b=> b-a etc.
                >
                > Try me again with your requirement please.
                > Looks like I didn't understand it.
                >
                >
                > --
                > Regards,
                >
                > Dave Pawson
                > XSLT + Docbook FAQ
                > http://www.dpawson.co.uk

                Sorry bout the unclearity!
                Problem:
                My pdf document (65 pages) contain 20 bills. Most bills goes over
                several pages. Each bill should be pagenumbered "page x of y pages"
                where y is the number of pages in that specific bill (not the number
                of pages in the pdf document).

                Example:
                invoice.pdf{
                Bill_1 "page x of 3"
                Bill_2 "page x of 2"
                Bill_3 "page x of 7"
                }

                Regards,
                Jørgen Romark
              • tokukobayashi2002
                Your request needs special extension to XSL-FO specification. XSL Formatter can do it by original extension.
                Message 7 of 11 , Jan 11, 2005
                • 0 Attachment
                  Your request needs special extension to XSL-FO
                  specification.

                  XSL Formatter can do it by original extension.

                  http://www.antennahouse.com/xslfo/axf3-extension.htm#axf.origin-id

                  ----------------------------------------------------
                  "axf:origin-id"
                  ----------------------------------------------------
                  Specifies the origin of the page number.
                  Value: <idref>
                  Initial: none
                  Applies to: fo:page-number-citation
                  Inherited: no
                  Percentages: N/A

                  ID for the origin of the page number can be specified in
                  fo:page-number-citation. The output page number is as follows:

                  [ref-id page] - [origin-id page] + 1

                  If the specified Page is after the ref-id page, the value becomes 0.
                  -----------------------------------------------------
                  You may speciafy as follows:
                  1. Assume each bill is specified as a page-sequence with
                  initial-page-number="1".

                  <fo:page-sequence inital-page-number="1">

                  2. Assign id="top-id" to the first fo:block of a bill

                  3. Assign id="bottom-id" to the last fo:block of a bill

                  4. Specify page-number as

                  page <fo:page-number> of <fo:page-number-citation ref-id="bottom-id"
                  axf:origin-id="top-id"/>

                  The formatted result should be:

                  page x of 3

                  You may request and download evaluation version of
                  XSL Formatter from here:

                  http://www.antennahouse.com/


                  Best regards,

                  Tokushige Kobayashi

                  --- In XSL-FO@yahoogroups.com, "jromark" <jorgen.romark@s...> wrote:
                  > Problem:
                  > My pdf document (65 pages) contain 20 bills. Most bills goes over
                  > several pages. Each bill should be pagenumbered "page x of y pages"
                  > where y is the number of pages in that specific bill (not the
                  number
                  > of pages in the pdf document).
                  >
                  > Example:
                  > invoice.pdf{
                  > Bill_1 "page x of 3"
                  > Bill_2 "page x of 2"
                  > Bill_3 "page x of 7"
                  > }
                  >
                  > Regards,
                  > Jørgen Romark


                  E-mail koba@...
                  WWW http://www.antenna.co.jp/XML/ (Japanese)
                  WWW http://www.antennahouse.com/ (English)
                  TEL +81-3-3234-1361 (direct call)
                  FAX +81-3-3221-9975
                • Dave Pawson
                  ... Assuming your input is XML, use XSLT features | extension to produce 20 xsl-fo documents, each then is a standard way of producing a single output, which
                  Message 8 of 11 , Jan 11, 2005
                  • 0 Attachment
                    On Tue, 2005-01-11 at 07:23 +0000, jromark wrote:

                    > Problem:
                    > My pdf document (65 pages) contain 20 bills. Most bills goes over
                    > several pages.

                    Assuming your input is XML,
                    use XSLT features | extension to produce 20 xsl-fo documents,
                    each then is a standard way of producing a single output, which
                    can then number your pages as you want.

                    input => 20 x xsl-fo docs using xslt
                    xsl-fo => pdf using xsl-fo formatter.

                    HTH DaveP

                    > Each bill should be pagenumbered "page x of y pages"
                    > where y is the number of pages in that specific bill (not the number
                    > of pages in the pdf document).
                    >
                    > Example:
                    > invoice.pdf{
                    > Bill_1 "page x of 3"
                    > Bill_2 "page x of 2"
                    > Bill_3 "page x of 7"
                    > }
                    >
                    > Regards,
                    > Jørgen Romark
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                  • G. Ken Holman
                    ... Put each of your bills into a separate page sequence so that you can start the page number at 1 for each bill. Flow at the end of each page sequence an
                    Message 9 of 11 , Jan 11, 2005
                    • 0 Attachment
                      At 2005-01-11 07:23 +0000, jromark wrote:
                      >Problem:
                      >My pdf document (65 pages) contain 20 bills. Most bills goes over
                      >several pages. Each bill should be pagenumbered "page x of y pages"
                      >where y is the number of pages in that specific bill (not the number
                      >of pages in the pdf document).
                      >
                      >Example:
                      >invoice.pdf{
                      > Bill_1 "page x of 3"
                      > Bill_2 "page x of 2"
                      > Bill_3 "page x of 7"
                      >}

                      Put each of your bills into a separate page sequence so that you can start
                      the page number at 1 for each bill. Flow at the end of each page sequence
                      an empty block with a unique id= value.

                      Then, in your static content you can do a <page-number-citation> to that
                      page sequence's unique value in order to get the bill's total number of pages.

                      I hope this helps.

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

                      --
                      World-wide on-site corporate, govt. & user group XML/XSL training.
                      G. Ken Holman mailto:gkholman@...
                      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
                      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
                      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
                      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
                    • tokukobayashi2002
                      I am sorry that I made a mistake. The following comment is not correct. Mr. Ken Holman s comment: 6128 Re: Page numbers int multidocument files is correct.
                      Message 10 of 11 , Jan 12, 2005
                      • 0 Attachment
                        I am sorry that I made a mistake.

                        The following comment is not correct.
                        Mr. Ken Holman's comment:
                        6128 Re: Page numbers int multidocument files

                        is correct.

                        Tokushige Kobayashi
                        --- In XSL-FO@yahoogroups.com, "tokukobayashi2002" <koba@a...> wrote:
                        >
                        > Your request needs special extension to XSL-FO
                        > specification.
                        >
                        > XSL Formatter can do it by original extension.
                        >
                        > http://www.antennahouse.com/xslfo/axf3-extension.htm#axf.origin-id
                        >

                        E-mail koba@a...
                        WWW http://www.antenna.co.jp/XML/ (Japanese)
                        WWW http://www.antennahouse.com/ (English)
                        TEL +81-3-3234-1361 (direct call)
                        FAX +81-3-3221-9975
                      Your message has been successfully submitted and would be delivered to recipients shortly.