14 Replies Latest reply on Sep 9, 2016 6:09 AM by mstfhyt

    countdowning page numbering indesign

    mstfhyt

      Hi guys!,

      I design a book which is page number are going to countdown( 289 next page will be 288, 287, 286 like this) but indesign doesn't support. Is there any script or plugin solve this problem, thank you very much for any help!

        • 1. Re: countdowning page numbering indesign
          Peter Spier Most Valuable Participant (Moderator)

          One way would be to create a reversed number list as a text file (you can do this easily in Excel).

           

          Put a pair of threaded frames on the master page and set the style for the paragraph to start in next frame, then place the number list starting on the first page of your document.

          1 person found this helpful
          • 2. Re: countdowning page numbering indesign
            Skemicle Level 3

            /*

            Scripted by Skemicle

            */

            if (parseFloat(app.version) < 6)

            main();

            else

            app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Add page numbers in reverse");

            function main() {

                var doc = app.activeDocument;

                var ro = doc.viewPreferences.rulerOrigin;

                doc.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;  ;

                doc.zeroPoint = [0,0];

                var myPages = doc.pages;

                var revPages = myPages.length;

                for(c=0;c<myPages.length;c++){

                    with(myPages[c].textFrames.add()){

                        parentStory.justification=Justification.AWAY_FROM_BINDING_SIDE;

                        geometricBounds = [10.5,.5,10.75,8];

                        contents = String(revPages);

                    }revPages = revPages - 1;

                }doc.viewPreferences.rulerOrigin = ro;

                doc.zeroPoint = [0,0];

            }

             

             

             

            This script will place text frames with the page numbers counting down at the bottom of each page. You can adjust where the text frames will be placed in the geometricBounds in line 18.

            1 person found this helpful
            • 3. Re: countdowning page numbering indesign
              Willi Adelberger Most Valuable Participant

              Make a document with right binding and handle it as it would be a left binding document.

              • 4. Re: countdowning page numbering indesign
                Salah Fadlabi Level 5

                When tried the script with facing pages, it put the two numbers on left side page of spread. How I can put numbers on each page of spread?

                numbers.jpg

                • 5. Re: countdowning page numbering indesign
                  Skemicle Level 3

                  I added lines 10, 11, 12, 21 and 22 after my original post. I'm assuming you got the script before I updated the code. Try to reinstall and let me know if it still isn't putting the numbers on each page.

                  • 6. Re: countdowning page numbering indesign
                    Salah Fadlabi Level 5

                    Tried again and this time it's putting the numbers on each spread page, but i have two notice:

                    1- The text frame always come overset +.

                    2- How can i put the number of right side spread on the right side of the page (see screenshot).

                    page2.jpg

                    • 7. Re: countdowning page numbering indesign
                      Skemicle Level 3

                      This script should fix the issue. The script was set up using inches as the measurement units.. I didn't think about other options.

                       

                      /*

                      Scripted by Skemicle

                      */

                      if (parseFloat(app.version) < 6)

                      main();

                      else

                      app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Add page numbers in reverse");

                      function main() {

                          var doc = app.activeDocument;

                          var prefs = doc.viewPreferences;

                          hmu = prefs.horizontalMeasurementUnits;

                          vmu = prefs.verticalMeasurementUnits;

                          prefs.horizontalMeasurementUnits = MeasurementUnits.INCHES;

                          prefs.verticalMeasurementUnits = MeasurementUnits.INCHES;

                          var ro = doc.viewPreferences.rulerOrigin;

                          doc.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;  ;

                          doc.zeroPoint = [0,0];

                          var myPages = doc.pages;

                          var revPages = myPages.length;

                          for(c=0;c<myPages.length;c++){

                              with(myPages[c].textFrames.add()){

                                  parentStory.justification=Justification.AWAY_FROM_BINDING_SIDE;

                                  geometricBounds = [10.5,.5,10.75,8];

                                  contents = String(revPages);

                              }revPages = revPages - 1;

                          }doc.viewPreferences.rulerOrigin = ro;

                          doc.zeroPoint = [0,0];

                          prefs.horizontalMeasurementUnits = hmu;

                          prefs.verticalMeasurementUnits = vmu;

                      }

                      3 people found this helpful
                      • 8. Re: countdowning page numbering indesign
                        Salah Fadlabi Level 5

                        Perfect! Thanks.

                        • 9. Re: countdowning page numbering indesign
                          Obi-wan Kenobi Adobe Community Professional

                          Skemicle, nice! 

                           

                          I use a different way!

                           

                          Capture d’écran 2016-08-22 à 22.41.28.png

                           

                          I select the text frame (not threaded) with the carriage return, placed on the master page and put the insertion point after the carriage return:

                           

                          Capture d’écran 2016-08-22 à 22.41.46.png

                           

                          As suggested by Peter, I use a "Numbers Generator"! Here, a very clever script written by Stanislav Antos.

                          As my pages range is: 2-22:

                           

                          Capture d’écran 2016-08-22 à 23.09.45.png

                           

                          This way allows more suppleness [I could play with other ranges or by section, …].

                           

                          Then, I thread this block with the one beside clicking with "Shift"!

                           

                          Capture d’écran 2016-08-22 à 23.10.36.png

                           

                          Done! 

                           

                          If the layout moves, …

                          I delete the layer used: "Page Number Inversed"

                          I duplicate the layer [save]: "Page Number Inversed -- SAVE"

                          I call it again: "Page Number Inversed"

                           

                          Capture d’écran 2016-08-22 à 22.58.03.png

                           

                          … And The Show Can Go On!

                           

                          (^/) 

                           

                          Link:  Indys scripts

                          2 people found this helpful
                          • 11. Re: countdowning page numbering indesign
                            mstfhyt Level 1

                            Thank you very much that is perfcet

                            • 12. Re: countdowning page numbering indesign
                              Obi-wan Kenobi Adobe Community Professional

                              Skemicle,

                               

                              Nice! Your script can indicate the remaining pages to read in a doc! …

                              To be really perfect, it would be great to introduce its capacity to play on "sections" in a doc or in a "book", maybe, e.g., by reference to a "Chapter" para style! 

                               

                              Capture d’écran 2016-08-23 à 10.34.46.png

                               

                              (^/)

                              • 13. Re: countdowning page numbering indesign
                                mstfhyt Level 1

                                Skemicle

                                How can I add also characther style page number script, is it possible?

                                • 14. Re: countdowning page numbering indesign
                                  mstfhyt Level 1

                                  Hi. Skemicle

                                  How can I add also characther style page number script, is it possible?