Mobile app version of vmapp.org
Login or Join
Cody3331749

: How to export layers as files in InDesign I have a one-page document with approximately 150 different layers, each containing an individual set of user credentials. I'm now looking to print 150

@Cody3331749

Posted in: #AdobeIndesign

I have a one-page document with approximately 150 different layers, each containing an individual set of user credentials. I'm now looking to print 150 copies of this document, one with each set of user credentials on it to send out to 150 different users.

Is there an easy way of automating this process or should I just get started doing 150 manual export operations toggling a new layer each time? The layers are named with the name of the users so there is no numbering or such available for scripting a loop based on layer name. It doesn't matter if I end up with 150 different files or one with 150 pages.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody3331749

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kristi927

Try this:
in menu window > utility > script
In script panel open Application > javascript and right-click on one file (example AddGuides.jsx) and select Show in Finder
Duplicate the file in Finder and rename in PagesFromLayers.jsx and now open it with simple text editor.
Paste this code:



var myPage;
var myItems;
var myDoc = app.activeDocument;
for (var i=0;i<myDoc.layers.length;i++){ // for each layers...
myPage = myDoc.pages.add(); // ...create a page...
myItems = myDoc.layers[i].allPageItems;
for (var k=0;k<myItems.length;k++){ //...and for each objects in layer...
myItems[k].duplicate(myPage); //...duplicate in the new page!
}
}


Save PagesFromLayers.jsx file and return in InDesign, open the file with multi-layers, double clik on PagesFromLayers.jsx (in script panel) and enjoy ;)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme