Skip to main content
Known Participant
July 29, 2015
Answered

how to apply specific operations for anchored image and non-anchored image separately..

  • July 29, 2015
  • 12 replies
  • 1197 views

i want to make some  changes for anchored and non-anchored image separately..

so first i want to find anchored and non-anchored image ...

This topic has been closed for replies.
Correct answer Jump_Over

Hi,

Lines 50 and 69:

if(img.parent.parent.hasOwnProperty("baseline"))

Cant manage what is this loop:

//...

for(var j=0 ; j<3; j++)

    {

//...

created for?

I suggest to remove it (if agree ==> remove last line {"}") as well

Jarek

12 replies

mani4Author
Known Participant
July 31, 2015

actually what i want to know is ,

i have many pictures in my indesign document and all are anchored as inline..

now i want to move pictures from one page to another page ...

so i iterate all pictures and release the anchor of all the pictures..

so that i can move the pictures from one page to another page..

but after releases the anchor of all pictures , when i run the script its showing error like..


Jump_Over
Legend
July 31, 2015

Hi,

Hard to say without looking into entire code.

Basically you cannot check this property for object which anchor were released.

Order of iterating is important as well.

Did you consider to move image.parent.parent? ==> it means to move character and keep graphic anchored

Jarek

Jump_Over
Legend
July 29, 2015

Hi,

Iterate through app.activeDocument.allGraphics      ==> array

If particular graphic.parent.parent.constructor.name == "Character"      ==> this graphic's container is anchored

Jarek