19 Replies Latest reply on Oct 5, 2011 8:44 AM by rob day

    Temporarily Hiding Photos in InDesign?

    SKFisk

      I have a large InDesign file that contains many (over 800) linked photo images - part of a membership directory. The organization I do this directory for also wants to post a PDF on their web site but without the photos. Is there any way to temporarily hide all of the photos so I can create a sans-photo PDF version without damaging the original InDesign file? I basically just need a way to toggle the photos off and on. Help!

        • 1. Re: Temporarily Hiding Photos in InDesign?
          Grant H Level 4

          on their own layer: hide the layer: then under pdf export: general: otions ...> export layers select visable layers.


          G

          • 2. Re: Temporarily Hiding Photos in InDesign?
            Peter Spier Most Valuable Participant (Moderator)

            The trick, of course, is to move them onto their own layer if they are not that way already, and nobody wants to deal with 800 of them individually.

             

            This might be scritpable though....

             

            Scripting forum is down the hall, on the left...

            • 3. Re: Temporarily Hiding Photos in InDesign?
              SKFisk Level 1

              So is there some way to easly move 800 plus photos to their own layer? How would you select and move them?

              • 4. Re: Temporarily Hiding Photos in InDesign?
                Grant H Level 4

                it would have to be scripted: problem is: what if some images are below "text" or other graphic and some are above ?

                • 5. Re: Temporarily Hiding Photos in InDesign?
                  SKFisk Level 1

                  I am pretty much an end-user type so scripting would be out of my comfort zone. I may just have to tell them it's not a practical option.

                   

                   

                   

                  The images are on all to the right in the name line so they are all pretty much in the same location. Name text would be to the left of the image and then there would be a return, to the next line.

                   

                   

                   

                  Steve

                  • 6. Re: Temporarily Hiding Photos in InDesign?
                    Peter Spier Most Valuable Participant (Moderator)

                    As I said, it may be scriptable. You should ask inthe scripting forum for a better answer (there are scripteres who hang out here, but the majority are over there).

                    • 7. Re: Temporarily Hiding Photos in InDesign?
                      Harbs. Level 6

                      Here's a script that will probably do what you want. I did not test AT ALL, so use with caution...

                       

                      var doc = app.documents[0];
                      var imageLayer = doc.layers.item('images');
                      if(!imageLayer.isValid){
                          imageLayer = doc.layers.add();
                          imageLayer.name = 'images';
                      }
                      var images =doc.images.everyItem().getElements();
                      for(var i=0;i<images.length;i++){
                          images[i].parent = imageLayer;
                      }
                      

                       

                      Save as plain text with a jsx extension in your Script Panel folder and double click from your script panel.

                       

                      Harbs

                      • 8. Re: Temporarily Hiding Photos in InDesign?
                        Peter Spier Most Valuable Participant (Moderator)

                        SKFisk wrote:

                         

                        I am pretty much an end-user type so scripting would be out of my comfort zone. I may just have to tell them it's not a practical option.

                         

                         

                        Most of us are just users like you. I don't write scripts (though I can read them a bit), but you don't don't needt o know anything about scripting or how they work to use them, anymore than you need to be able to reguild the engine in your car to be able to drive it. Scripts are a very powerful way to extend the capabilities of your out-of-the-box installation of ID, like an after-market GPS unit expanded the capabilities of my 2001 Toyota, and to automate what would otherwise take you a long time to do manually.

                         

                        I see Harbs (who is a very fine scripter) has written something for you. You should try it. I would make a copy of the file first, then run the script on the copy and see what happens. You can read about installing scripts at How to install scripts in InDesign | InDesignSecrets

                        • 9. Re: Temporarily Hiding Photos in InDesign?
                          SKFisk Level 1

                          Thanks, I will give it a try!

                           

                          Steve

                          • 10. Re: Temporarily Hiding Photos in InDesign?
                            Peter Spier Most Valuable Participant (Moderator)

                            Since Harbs didn't tell you waht it is doing, I'll see if I can explain what happens when you run it.

                             

                            The script is operating on the document that is open at the time it is run. The first part says look at the active document and find an "images" layer. If you don't find a layer named images, add one.

                             

                            The second part steps though every image in the file and moves it onto the images layer (by changing its "parent"). Looks pretty foolproof.

                            • 11. Re: Temporarily Hiding Photos in InDesign?
                              [Jongware] Most Valuable Participant

                              Peter Spier wrote:

                               

                              .. Looks pretty foolproof.

                               

                              The OP talks about images being 'in a line' and having a return right after them. If that's a literal description of what he did do, I bet Harbs' script won't work -- it's written to work with stand-alone images, not inline ones.

                              • 12. Re: Temporarily Hiding Photos in InDesign?
                                Peter Spier Most Valuable Participant (Moderator)

                                OK, good point. And anchored images can't be on a different layer, so the problem becomes a lot more complex -- right up your alley.

                                 

                                How about finding all anchored images and applying a character style to the anchor? Can you do that? If so, would adding a conditional text condition to it make it possible to hide the condition (and the image)? Seems like text might reflow, though, so it may not be practical.

                                • 13. Re: Temporarily Hiding Photos in InDesign?
                                  rob day Adobe Community Professional & MVP

                                  You could save a copy of the document and run a script that deletes all of the links. This AppleScript does that:

                                   

                                  tell application "Adobe InDesign CS3"

                                      tell active document

                                          set IDLinks to links

                                          repeat with myCounter from 1 to count IDLinks

                                              delete parent of item myCounter of IDLinks

                                          end repeat

                                      end tell

                                  end tell

                                  • 14. Re: Temporarily Hiding Photos in InDesign?
                                    BobLevine MVP & Adobe Community Professional

                                    That still takes us back to the text reflow issue.

                                     

                                     

                                     

                                    Bob

                                    • 15. Re: Temporarily Hiding Photos in InDesign?
                                      Luke Jennings Level 4

                                      If the photos all appear in the exact the same part of the page you can try this work-around. Make a new layer, copy all of the photos from one of the pages and paste in place on your master page(s), delete the photos and make the picture boxes white. This will hide all of the photos. Export to PDF.

                                      • 16. Re: Temporarily Hiding Photos in InDesign?
                                        [Jongware] Most Valuable Participant

                                        Peter Spier wrote:

                                         

                                        OK, good point. And anchored images can't be on a different layer, so the problem becomes a lot more complex -- right up your alley.

                                         

                                        Y-e-e-e-e-h well, maybe "no". You cannot move an inline image to another layer, so what one could do is to copy the image to the image layer instead and delete the image--but not its frame!--from the original position. There is a *huge* drawback, though, to this method: if the text reflows, the now-empty 'placeholder' frame will move along with the text but the copy containing the actual image will stay on its place. It kind of defeats the idea of having a single editable document for both purposes.

                                         

                                        I suggest opening a copy of the document, then running this little Javascript:

                                         

                                        var images = app.activeDocument.allGraphics;
                                        for(var i=0;i<images.length;i++)
                                        {
                                            images[i].remove();
                                        }
                                        

                                         

                                        which will remove all images without touching their frames. Export the document to PDF and then throw it away -- there is no good reason to save this copy somewhere, as you should always be working with the original file. Saving the emptied-out file somewhere will inevitably lead to confusion and errors.

                                        • 17. Re: Temporarily Hiding Photos in InDesign?
                                          SKFisk Level 1

                                          The directory is fairly small. There are five individuals per page. Each individual has ten lines that include their name and photo, job title, address, phone, e-mail, etc. The photo is placed (Ctrl+D) at the right margin of the name line, which is the first line. Once I enter the name I tab over to the right margin and place the photo.

                                           

                                           

                                           

                                          All of the photos are against that right margin and none of the text that follows extends under a photo image. That makes me wonder about using a white layer on the master page that covers just enough of the right side to hide the images. That can then be turned on or off as needed, right. Does that seem like it might work? Can layers in ID be turned on and off like in Photoshop?

                                           

                                          Steve

                                          • 18. Re: Temporarily Hiding Photos in InDesign?
                                            Luke Jennings Level 4

                                            "Can layers in ID be turned on and off like in Photoshop?"

                                            Yes, give it a try.

                                            • 19. Re: Temporarily Hiding Photos in InDesign?
                                              rob day Adobe Community Professional & MVP

                                              That still takes us back to the text reflow issue.

                                               

                                              I don't think so, my script leaves the picture frame—just deletes the link. If the frame has a color might need to add a line to set it to none.

                                               

                                              Jongware's #16 is the same script