Skip to main content
Inspiring
May 10, 2009
Answered

How to tag position locked images

  • May 10, 2009
  • 1 reply
  • 1547 views

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.

This topic has been closed for replies.
Correct answer

"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.


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

1 reply

srakete
Inspiring
May 11, 2009

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

myRectangle.locked = false;

and the do the markup ?

Stefan Rakete

Inspiring
May 12, 2009

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...

srakete
Inspiring
May 12, 2009

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