15 Replies Latest reply on Jun 22, 2016 2:07 PM by sarahcoppen

    Inserting Non-Numbered Pages into Existing Document

    sarahcoppen Level 1

      Hello,

       

      Somewhat new user with InDesign here and hope this question makes sense.

       

      I have created a student manual in InDesign and have managed to set up the automatic page numbering and everything is working fine. However, we now need to create an Instructor manual that needs to have the following done and I have no idea how to accomplish this goal:

       

      We need to insert a left hand page in each spread that does not have any page numbers (the page will be used for notes) that will not affect the existing page numbering scheme. So basically we are going to be doubling the pages in the manual but want to keep the page numbers the same for the right hand pages in each spread. Instead of spreads being numbers as 1-2, 3-4, etc, they would now need to be X-1, X-2, X-3 (where X represents no numbers).

       

      Can this be done? Thanks in advance!

        • 1. Re: Inserting Non-Numbered Pages into Existing Document
          BarbBinder Adobe Community Professional

          InDesign wants to number consecutivey.

           

          You'll have to customize the numbering for the right pages by right-clicking each one in the pages panel and selecting Numbering and Section Options.

          • 2. Re: Inserting Non-Numbered Pages into Existing Document
            sarahcoppen Level 1

            The document we need to edit has almost 300 pages, is there no easier way to accomplish this?!

            • 3. Re: Inserting Non-Numbered Pages into Existing Document
              BarbBinder Adobe Community Professional

              Sit tight, and someone may pop up with a script to manage this for you. But no, not within the feature set of the InDesign.

              • 4. Re: Inserting Non-Numbered Pages into Existing Document
                sarahcoppen Level 1

                Alternately, is there any way to have the page number just show up for the spread so that the two pages in the spread would both have the same page number? Would all spreads going forward in the document then be able to be assigned with the same page numbers? For example 1-1, 2-2, 3-3 etc instead of 1-2, 3-4, 5-6

                 

                I have found lots of scripts for cs3 and cs5 to do this but nothing for cc!

                • 5. Re: Inserting Non-Numbered Pages into Existing Document
                  BarbBinder Adobe Community Professional

                  No--again not within the feature set of InDesign. Anything beyond consecutive numbering is restarted manually. You might try posting the same question on the InDesigh Scripting forum to see if you can get a CC specific response.

                  • 6. Re: Inserting Non-Numbered Pages into Existing Document
                    Laubender Adobe Community Professional & MVP

                    sarahcoppen wrote:

                    I have found lots of scripts for cs3 and cs5 to do this but nothing for cc!

                     

                    Hi Sarah,

                    how did you do your document setup?
                    Is it with facing pages? Did you already insert the left pages for the notes?

                    Or should a script do this as well, if you started with a single pages document?

                     

                    Did you test some of the scripts? ( Do your tests always on duplicated InDesign documents. )
                    At least for the ones created for CS5 there is a chance, that they will work for CC 2015 as well.

                     

                    Uwe

                    • 7. Re: Inserting Non-Numbered Pages into Existing Document
                      Laubender Adobe Community Professional & MVP

                      Hi Sarah,

                      as I can see from the title of this thread you want to add the pages.

                       

                      If we start out from a single page document like that where the automatic numbering is dictated by Master A:

                       

                      1-StartingOut-SinglePagesDocument.png

                       

                      And if you want to achieve this:

                       

                      2-AfterRunningScript-FacingPages-PagesAdded-NumberingChanged.png

                       

                      Then run the following ExtendScript (JavaScript) from InDesign's Scripts Panel:

                       

                      // AddOnePageBeforeAnyPage-AddSections-RenumberPages-SinglePageDocument.jsx
                      // Uwe Laubender
                      
                      /**
                      * @@@BUILDINFO@@@ AddOnePageBeforeAnyPage-AddSections-RenumberPages-SinglePageDocument.jsx !Version! Tue Jun 21 2016 07:19:25 GMT+0200
                      */
                      
                      /*
                          See discussion at InDesign forum:
                          "Inserting Non-Numbered Pages into Existing Document"
                          sarahcoppen Jun 20, 2016
                          https://forums.adobe.com/message/8822592#8822592
                      */
                      
                      
                      app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
                      app.doScript
                          (
                         
                          addPages,
                          ScriptLanguage.JAVASCRIPT,
                          [],
                          UndoModes.ENTIRE_SCRIPT,
                          "Add pages before every page | SCRIPT"
                         
                          );
                      
                      function addPages()
                      {
                          if(app.documents.length == 0){return};
                          if(app.documents[0].documentPreferences.facingPages){return};
                         
                          var doc = app.documents[0];
                          var pages = doc.pages;
                          var pagesLength = pages.length;
                         
                          doc.documentPreferences.properties =
                          {
                              allowPageShuffle : true ,
                              preserveLayoutWhenShuffling : true
                          }
                         
                          for(var n=pagesLength-1;n>=0;n--)
                          {
                              doc.pages.add(LocationOptions.BEFORE , pages[n] , { appliedMaster : NothingEnum.NOTHING } );
                          }
                      
                          doc.documentPreferences.startPageNumber = 2;
                          doc.documentPreferences.facingPages = true;
                         
                          doc.documentPreferences.properties =
                          {
                              allowPageShuffle : false ,
                              preserveLayoutWhenShuffling : true
                          }
                         
                          pages = doc.pages;
                          pagesLength = pages.length;
                          var counter = 0;
                         
                          for(var n=1;n<pagesLength;n=n+2)
                          {
                              counter++
                              doc.sections.add( pages[n] , { continueNumbering : false , pageNumberStart : counter } );
                          }
                         
                      }
                      

                       

                      What I do not understand yet is your numbering scheme for the regular pages.

                      If you are using the master A for the automatic numbering you could simply add "-2" to the automatic number to achieve this:

                      1-2, 2-2, 3-2, 4-2 etc.pp.

                       

                      On Master A:

                      3-NumberingScheme-n-2-MasterA.png

                       

                      On regular page 4:

                       

                      4-NumberingScheme-n-2-RegularPage.png

                       

                      My script will simply pick up the automatic page numbering from master A.

                      Master "None" will be applied to the new pages for the notes.

                      If you like to introduce numbering on the "notes" pages the script must be expanded for adding new sections and a different numbering schema.

                       

                      Important notes:

                      1. You can undo the whole script's action in one go.

                      2. I developed and tested the script with InDesign CS6 v8.1.0, but it will also run with CC 2015.3.

                      3. If you want to print pages or if you want to export pages to PDF, you have to use the absolute page numbers of the document like that:

                       

                      Example:

                      +2, +4, +6 , +8

                      to print regular pages 1 to 4 (and not the notes).

                       

                      If you want to print or export the notes from 1 to 4 you have to do it like that:

                      +1, +3, +5, +7

                       

                      +1-+8 will give you the notes plus the regular pages from 1-4.

                       

                      Absolute page numbers in the PDF Export dialog:

                       

                      5-Export-PageNumbers-AbsoluteNumberingScheme.png

                       

                      All screenshots from my German version of InDesign.
                      CS6 v8.1.0 on Mac OSX 10.6.8.

                       

                       

                      Regards,
                      Uwe

                      1 person found this helpful
                      • 8. Re: Inserting Non-Numbered Pages into Existing Document
                        George_Salnik Adobe Community Professional

                        >> (the page will be used for notes)

                        Equal page, where you not be add some individually? If yes, don't worry and ask your prepress do needed imposition before printing your PDF.

                        • 9. Re: Inserting Non-Numbered Pages into Existing Document
                          sarahcoppen Level 1

                          Laubender, your first 2 screenshots and following script are exactly what I am trying to achieve! I was able to run the script successfully on a blank document but when I try to run on my existing document the script is hanging up and highlighting line 64. What am I doing wrong? Again, please excuse my ignorance as this is the first time I've used scripts in InDesign. Here is a screenshot of what I'm seeing:

                          2016-06-21_1123 - TheRENI's library

                           

                          InDesign just keeps spinning in the background and if I try to make any changes (FYI, I deleted the "n" in "pages[n]" as shown in the screenshot) it gives me the following error:

                           

                          2016-06-21_1125 - TheRENI's library

                          • 10. Re: Inserting Non-Numbered Pages into Existing Document
                            Laubender Adobe Community Professional & MVP

                            Hi Sarah,

                            I know what the problem is. Your InDesign document already contains some sections. I did not foresee this detail. And my script is trying to overwrite one that is already there. That will force the error message at the bottom of the ESTK: "Another section already exists on this page"

                             

                            What I could do:
                            Add a function to the script that removes all sections in your document but the first one on page 1 that is not removable. ( A section is indicated by the small triangle at the top of the page icon in the Pages panel )

                             

                            What is the purpose of your additional sections?
                            Could you remove the sections but the one that is there at default on page 1 and try my script again?

                             

                            Note 1: Only test on a duplicate of your document.

                            Note 2: Removing the "n" in the bracket will break the script. Please, don't do that. :-)
                            "n" is the variable for the number that moves the loop forward for creating new pages.

                             

                            Best,
                            Uwe

                            1 person found this helpful
                            • 11. Re: Inserting Non-Numbered Pages into Existing Document
                              sarahcoppen Level 1

                              (The "n" in the bracket was deleted by mistake, just wanted to make sure you knew it had been deleted in the screenshot so you didn't think I ran it that way.)

                               

                              The sections are set to avoid numbering the pages for the cover, inside of the cover and first couple of TOC pages. I removed the sections on a duplicate document and tested and the script does exactly what is needed with the except of those first few pages. I can probably find a work around for that, you've already saved me hours and hours of work! Maybe just exporting the PDF and adding in the first sections manually before sending to print. That definitely wouldn't be so complicated.

                               

                              I was literally in tears yesterday thinking about how much work was in front of me but you are an absolute angel and completely saved the day! I can't thank you enough!!!!

                              • 12. Re: Inserting Non-Numbered Pages into Existing Document
                                Laubender Adobe Community Professional & MVP

                                Me again.

                                If you want to remove all additional sections, run the following script before the one I already posted:

                                 

                                // RemoveAllAdditionalSections.jsx
                                // Uwe Laubender
                                
                                /**
                                * @@@BUILDINFO@@@ RemoveAllAdditionalSections.jsx !Version! Tue Jun 21 2016 21:03:47 GMT+0200
                                */
                                
                                
                                app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
                                app.doScript
                                    (
                                   
                                    removeSections,
                                    ScriptLanguage.JAVASCRIPT,
                                    [],
                                    UndoModes.ENTIRE_SCRIPT,
                                    "Remove sections | SCRIPT"
                                   
                                    );
                                
                                function removeSections()
                                {
                                    if(app.documents.length == 0){return};
                                    var doc = app.documents[0];
                                    var allSectionsArray = doc.sections.everyItem().getElements();
                                    var sectionsLength = allSectionsArray.length;
                                   
                                    if(sectionsLength == 1){return};
                                   
                                    for(var n=sectionsLength-1;n>=1;n--)
                                    {
                                        allSectionsArray[n].remove();
                                    }
                                   
                                }
                                

                                 

                                You can undo all its action in one go.

                                 

                                Here a screenshot of my German InDesign CS6 showing the Pages panel with an additional section marker:

                                 

                                AdditionalSectionVisibleInPagesPanel.png

                                 

                                 

                                Best,
                                Uwe

                                1 person found this helpful
                                • 13. Re: Inserting Non-Numbered Pages into Existing Document
                                  Laubender Adobe Community Professional & MVP

                                  sarahcoppen wrote:

                                   

                                  … The sections are set to avoid numbering the pages for the cover, inside of the cover and first couple of TOC pages. …

                                  What is the page number your "normal" section of numbering will start?

                                  Will it start with the name "1"? Then you or me could change the script accordingly.

                                   

                                  Can you show a screenshot of the first pages visible in your Pages panel?

                                  Or can you give me a list of your numbering scheme in place?

                                   

                                  Regards,
                                  Uwe

                                  • 14. Re: Inserting Non-Numbered Pages into Existing Document
                                    sarahcoppen Level 1

                                    This is the screenshot to my Pages panel:

                                    2016-06-21_1338 - TheRENI's library

                                     

                                    The page numbers, where it is noted as 1 in the Panel, actually start at page 6. When I run your script, it starts everything back from page 1. I can work around this but if there is a fix or a way to start at a different number other than page 1 that would be GREAT.

                                    • 15. Re: Inserting Non-Numbered Pages into Existing Document
                                      sarahcoppen Level 1

                                      Here's another dilemma...

                                       

                                      What method would be used to insert new spreads with new sections into the document? The instructor notes for some pages span more than one page therefore it may take two spreads to cover that note content. For example: 149, 149 exists as one spread and now I need to duplicate the exact same spread so that the Pages list reads 148,148; 149,149; 149,149; 150,150... Thoughts?