7 Replies Latest reply on May 12, 2009 6:29 PM by eboda_snaf

    How to tag position locked images

    eboda_snaf Level 1

      In Indesign CS 3 and CS 4, when an Image was position locked, I could not use the Tag Frame function on the image.

      Neither could I change the element position in the structure window of position locked images..

       

      Was this something new in CS3 and CS4? how to disable/overcome this restriction?

      Can someone please advise.. Thanks a alot.

        • 1. Re: How to tag position locked images
          srakete Level 1

          Could you not just unlock the Rectangle that contains the image ?

           

          myRectangle.locked = false;

           

          and the do the markup ?

           

           

          Stefan Rakete

          • 2. Re: How to tag position locked images
            eboda_snaf Level 1

            Hi, thanks for the reply.

             

            Mostly a page contains lots of images and texts.

            We need to have all objects locked before doing markup so as to prevent any object on the page be accidently moved/changed without knowing during the markup process.

            We are able to do markup on locked objects in CS2...

            • 3. Re: How to tag position locked images
              srakete Level 1

              Hi,

              what exactly do you want to avoid by locking the object ? Can you give an example ?

              If your desired final output is an XML Export with the structure you created, you could revert the document

              to the original version after export or not save the document and save a copy of the current document.

               

              Stefan

              • 4. Re: How to tag position locked images
                eboda_snaf Level 1

                by locking the objects on the page, it will help to secure the look of the objects.

                Because before you markup individual page objects, you need to first select the object followed by assigning it to the relevant tag.

                This object selection action might accidently "moved" the object even without you knowing.

                 

                I need to have both PDF and the XML of the page.

                • 5. Re: How to tag position locked images
                  eboda_snaf Level 1

                  "you could revert the document to the original version after export or not save the document and save a copy of the current document."

                  This is not possible, because after the tagging process of a page, we will to run a third-party plugin which will grab the XML and PDF from the page at the same time automatically for other applications.

                  • 6. Re: How to tag position locked images
                    Olav Martin Kvern Level 3

                    Hi eboda_snaf,

                     

                    It's not clear from your messages that this is a scripting question, but I'll answer as if it is. Take a look at the Scripting Guide script MarkingUpGraphics.jsx. We can demonstrate your problem by making a few changes to the script. Find the line (in the mySnippet function):

                     

                    var myGraphic = myDocument.pages.item(0).pageItems.item(0).graphics.item(0);

                     

                    Now add this line following the line above:

                     

                    myGraphic.parent.locked = true;

                     

                    Run the script, and you'll see the error message stating that InDesign cannot tag the graphic because it's locked.

                     

                    Now add the following lines below the line we just added:

                     

                    var myRestoreLock = false;

                    if(myGraphic.parent.locked == true){
                    myGraphic.parent.locked = false;
                    myRestoreLock = true;
                    }

                    Next, find the line:

                     

                    var myXMLElement = myDocument.xmlElements.item(0).xmlElements.add(myXMLTag, myGraphic);

                     

                    ...and add the following lines below it:

                     

                    if(myRestoreLock == true){
                    myGraphic.parent.locked = true;
                    }

                     

                    Now run the script again. You'll see that the script unlocks the graphic (or its parent rectangle, really). The script will not change the location of the graphic.

                     

                    Thanks,

                     

                    Ole

                    • 7. Re: How to tag position locked images
                      eboda_snaf Level 1

                       

                      The script works well. Thanks alot!!