4 Replies Latest reply on Mar 9, 2016 4:43 AM by Laubender

    Yellow and Blue boxes in InDesign CC 2014

    Balagex

      Hi,

       

      In a project we have to manipulate InDesign files via the java script interface of the InDesign CC Server 2014. The files are created with Indesign CC 2014.

      I am totally new in this InDesign topic, and never used any component of them. Now I would like to ask some very basic, maybe stupid questions, and would like to get some confirmation or correction.

       

      I want focus to placing and changing images on the page.

      As I see, when an image placed to a page, there is 2 kind of borders/boxes, what a user can manipulate. In the begining, both yellow and blue box has a same position, size, etc.

      yellow_and_blue.JPG

      By my understaning, the yellow box represent the image itself, and the blue box works as some kind of mask/window, and only that part of the image will be seen on the page what is covered by the blue box area. Is it a very important question for me, so please confirm, Is it true or not.

       

      So clicking on the circle thing, the yellow box can be resized. As I see, if the Auto-fit option is set, and I resizing/moving the blue box, the yellow will be resized/moved with it, but if I not set this option, I can freely resize the blue box independently from the yelow.

       

      yellow_and_blue2.JPG

       

      So, if we replace an image via scripts, the new image will be "placed" into the yellow box and will be seen throught the blue box. Is it right?

       

      What happen when we place an image into the yellow box, but the image scale and the box scale is different? Will any scale to fit or scale to fill resizing happen? If yes, which one, and how can I determine it via scripts?

       

      Regards

      Balázs

        • 1. Re: Yellow and Blue boxes in InDesign CC 2014
          Willi Adelberger Most Valuable Participant

          There are not boxes.

           

          What you see are frames and content.

          If you select the frame, it gets a selection in the color of the Layer (F7).

          If you select an image form that frame, it shows up as selected in the complimentary color of the Layer (F7)

          It is important to work with different layers to avoid conflicts with master items.

           

          What I am missing in your document is the bleed settings of the document.

          • 2. Re: Yellow and Blue boxes in InDesign CC 2014
            Balagex Level 1

            Hi,

             

            So as I understand, the content is the image itself (yellow box in my sample), and the frame (blue box in my sample) is that thing, mask/window/whatever, where the content or its part can be seen.

             

            So, there is a hill in front of my house (that is the content), and I am sitting in the room, and watching the hill through the window (frame), and I can see only that part of the hill, as big as the window of my room.

             

            When I getting a content, I can get the graphics via java script, and when we changing it, we doing the following:

             

            var newFile = new File(newLinkPath);

            var graph = graphics[i];

            var graphics = myDocument.allGraphics;

            some selection from the list...

            var graph = graphics[i];

            var name = graph.name;

            var label = graph.label;

            var myLink = graph.itemLink;

            var oldLinkPath = myLink.filePath;

            myLink.relink( newFile );

            var newLink = myLink.update();

            newLink.parent.label = label;

            newLink.parent.name = name;

             

            So, when we doing this, as I see it replace the content, Am I right?

             

            As I see in the documenttation, there is some kind of fitting option, what can be used, so when a new image has been linked to the content, it size can be chnaged based on the fitting options. Is it right?

             

            content_fitting.JPG

            • 3. Re: Yellow and Blue boxes in InDesign CC 2014
              Balagex Level 1

              Ok, and a noob question, what is the bleed settings, what missing for you, where can I check it?

              • 4. Re: Yellow and Blue boxes in InDesign CC 2014
                Laubender Adobe Community Professional & MVP

                This is not the InDesign Scripting forum.
                But in principle, there is also a different method to replace an image.
                For example the place() method of the container frame (it might be of type Rectangle, Oval or Polygon or maybe even of GraphicLine).

                 

                // EDIT:

                Or use place() directly on the placed graphic like the following example is showing.

                 

                Example with ExtendScript (JavaScript)
                Select two container frames, where different images are placed.

                Run the following snippet from the ESTK (ExtendScript Toolkit) on the selection:

                 

                var selection = app.selection;
                var imageFileOne = app.selection[0].graphics[0].itemLink.filePath;
                var imageFileTwo = app.selection[1].graphics[0].itemLink.filePath;
                
                app.selection[0].graphics[0].place(imageFileTwo,false,undefined);
                
                

                 

                 

                The InDesign Scripting forum can be found here:

                InDesign Scripting

                 

                Uwe