5 Replies Latest reply on Sep 9, 2016 5:46 AM by Eugene Tyson

    Toggle pages of a linked Indesign document inside Indesign?

    mmackinven

      Hey guys, I want to find an easy way to change what page is being displayed of a linked Indesign document inside and Indesign document.

       

      I.e. I have a presentation Indesign document, and all the links are OTHER Indesign documents (press ads, billboards etc etc). However a lot of these linked ID docs have several pages in them, so to change the page of the next link I have to CMD + D to place, and tick the 'Show import options' to select a new page to place.

       

      Is there a way to just toggle the page number without placing the file again? Much like toggling 'Object Layer Options'?

       

      Same goes for linked PDFs as well!

       

      Cheers

        • 1. Re: Toggle pages of a linked Indesign document inside Indesign?
          Steve Werner Adobe Community Professional & MVP

          Unless you write a script (or get someone to write one for you), that's the way it works. It's really no different than replacing it with another picture.

          • 3. Re: Toggle pages of a linked Indesign document inside Indesign?
            Steve Werner Adobe Community Professional & MVP

            The scripters come to the rescue! The solution to many problems.

            • 4. Re: Toggle pages of a linked Indesign document inside Indesign?
              Laubender Adobe Community Professional & MVP

              mmackinven wrote:


              Is there a way to just toggle the page number without placing the file again? Much like toggling 'Object Layer Options'?

              As Steve already said:
              No. Unfortunately there isn't something for you in InDesign's user interface that could do this.

               

              Eugene pointed to an ExtendScript script snippet by John Hawkinson, that is grabbing the file behind the placed object (an image, a PDF, an AI document, an InDesign document etc.pp.) and will invoke the place dialog where you can check different options for placing: A different page, using bleed instead of the cropped page, changing the settings for layer visibility.

               

              However:

              That script snippet does no checks on your selection and the availability of the file and will throw an error if you cancel the dialog.
              Here a version of that snippet that does some checks. And also finds a placed document, that's nested a bit deeper (perhaps you selected a group of objects and the placed document is part of that group).

               

              Code is ExtendScript (JavaScript) and should work with InDesign CS4 and above:

               

              // PlaceAgain-PlaceOptionsShowing-SELECTION.jsx
              // Uwe Laubender
              
              //DESCRIPTION:Select a placed image, PDF or InDesign document to replace it with itself getting options
              
              /**
              * @@@BUILDINFO@@@ PlaceAgain-PlaceOptionsShowing-SELECTION.jsx !Version! Fri Sep 09 2016 14:09:53 GMT+0200
              */
              
              /*
                  Posted in this thread at Adobe InDesign Forum:
                  "Toggle pages of a linked Indesign document inside Indesign?"
                  mmackinven | Sep 9, 2016
                  https://forums.adobe.com/message/8993859#8993859
                  
                  You can either select the placed file directly or its container frame.
                  Or, if its part of a group, the group itself.
                  Or, if the container frame is pasted inside another object, that object.
                  
              */
              
              placeAgainSelection();
              
              function placeAgainSelection()
              {
                  if(app.documents.length == 0){alert("ERROR"+"\r"+"No document is open."); return};
                  if(app.selection.length != 1){alert("ERROR"+"\r"+"Select one single item containing a placed file."); return};
              
                  // The placed object is selected:
                  if
                  (
                      app.selection[0].constructor.name == "ImportedPage" || 
                      app.selection[0].constructor.name == "PDF" ||
                      app.selection[0].constructor.name == "EPS" ||
                      app.selection[0].constructor.name == "Image" ||
                      app.selection[0].constructor.name == "PICT" ||
                      app.selection[0].constructor.name == "WMF"
                  )
                  {    
                      var graphic = app.selection[0];
                  };
                  
                  else if(app.selection[0].allGraphics.length == 0){return};
                  
                  // The container of the placed object is selected:
                  else{var graphic = app.selection[0].allGraphics[0]};
              
                  // Two important checks:
                  // Case 1: Graphic was pasted on the page from e.g. PhotoShop:
                  if(graphic.itemLink == null){alert("ERROR"+"\r"+"The graphic was pasted on the page. The original file cannot be found.");return};
                  // Case 2: Link is not available, because placed graphic was renamed, removed or otherwise is not available:
                  var file = File(graphic.itemLink.filePath);
                  if(!file.exists){alert("ERROR"+"\r"+"\""+file.name+"\""+"\r"+"File cannot be found."); return};
                  
                  // If you cancel the place options dialog, no error will be thrown:
                  try{
                  graphic.place(file,true);
                  }catch(e){};
              };
              

               

              Regards,
              Uwe