• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is there a script/something to put every element of your Indesign doc onto a separate layer?

New Here ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

Help. The reason I need this is, our designers have created a huge Indesign document that i need to Psd to send to our web guys.

Ive found a scipt that converts indesign to psd layered perfectly but each element of the Indesign doc has to be on a layer!!.

Help!

TOPICS
Scripting

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

not to hard i think:

var doc=app.activeDocument;

var pi=doc.allPageItems, l=pi.length;

while (l--)

{pimove(doc.layers.add()};

alert("Done!\nYou can go outside an play now!");

can't test for now, so let me know.

ps. depending on document.. you can go outside an play UNTIL it finishes

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

Screen shot 2012-11-21 at 14.05.24.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

it is a javascript, not a appleScript.

change the extension to JSX

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

Screen shot 2012-11-21 at 14.27.59.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

uups.. forgot a paranthesis.. (and a dot, it seems)

sorry:

var doc=app.activeDocument;

var pi=doc.allPageItems, l=pi.length;

while (l--) {pimove(doc.layers.add()};

alert("Done!\nYou can go outside an play now!");

my machine finaly finished exporting so i can test it.

notes:

it won't work if you have groups, either ungroup them or.. I will try to do something, but not today.

it will go into master pages and move everything on differnet layers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

Appreciate your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2012 Nov 22, 2012

Copy link to clipboard

Copied

LATEST

@Vamitul – you still forgot a dot and a paranthesis…
And it will not only work with Group objects, but will fail on anchored objects, too.

A better approch will be to duplicate the objects to new layers. But also with that method there is a risk: the position of duplicated anchored objects will change and to single out objects out of groups means getting into trouble, too:

var doc=app.activeDocument;

var pi=doc.allPageItems, l=pi.length;

while (l--) {pi.duplicate(doc.layers.add())};

alert("Done!\nYou can go outside an play now!");

Before script (TextFrame with anchored object on the "blue" layer):

BeforeScript.png

After script (TextFrame without anchored object on the green layer, the now duplicated un-anchored object on the "red" layer):

AfterScript.png

And another thing: if an anchored object has "Text Wrap: on" the text of the duplicated object will reflow.
So, you have to store the positions of anchored objects and set them back to its original.

Another thing about groups: in duplicating single objects out of a group, you will loose any effect that is applied to the group.
So you have to single out groups of your pageItems.

You see it's getting complicated here…

Maybe it's worth thinking about NOT using "allPageItems" but the simple "pageItems". Then "Groups" will stay "Groups" and anchored objects will remain anchored:

var doc=app.activeDocument;

var pi=doc.pageItems, l=pi.length;

while (l--) {pi.move(doc.layers.add())};

alert("Done!\nYou can go outside an play now!");

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines