Skip to main content
Known Participant
January 24, 2020
Answered

Indesign Package Script...

  • January 24, 2020
  • 4 replies
  • 8455 views

Is there a way to select multiple (or choose all open) Indesign files and collect each file individually (with it's own links/fonts) in their own seperate folders without having to do it for each file?

This topic has been closed for replies.
Correct answer Mike Bro

you should give Peter Kahrel's Batch Convert script a try.....it has an option to do exactly what you're asking plus a lot more.

https://creativepro.com/files/kahrel/indesign/batch_convert.html

 

Regards,

Mike

4 replies

Community Expert
February 2, 2020

Hi attiliolucchese77,

we need more info. What's your version of InDesign? What's your operating system?

 

Note: The number of arguments of method packageForPrint() changed.

Argument useDocumentHyphenationExceptionsOnly was finally added in InDesign CC 2018.

But unforunately it was not added at the end of the list of arguments.

 

Regards,
Uwe Laubender

( ACP )

Known Participant
February 3, 2020

Peter Kahrel's Batch Convert script was what i was looking for. Thanks for allyour help.

Kasyan Servetsky
Legend
January 26, 2020

Check out the Package section on this page.

 

— Kas

Mike BroCorrect answer
Legend
January 24, 2020

you should give Peter Kahrel's Batch Convert script a try.....it has an option to do exactly what you're asking plus a lot more.

https://creativepro.com/files/kahrel/indesign/batch_convert.html

 

Regards,

Mike

briann57175377
Inspiring
February 1, 2020

the only caveat, is that indesign will crash during the packaging process. Specifically, it will crash when it tries to make the pdf during the packaging process, after it copied the art. This only happens when the linked art is large (1 GB and above). I am sure it's a something in Indesign though, some memory overflow perhaps. If that happens, collect it without making the pdf and then make the pdf separately. 

brian_p_dts
Community Expert
Community Expert
January 24, 2020

You can iterate through open documents using app.documents, or get open a list of files using File.openDialog(). Then use packageForPrint() method on each doc. The first 8 arguments are required; there are additional arguments available: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Document.html#d1e49241__d1e54464

 

Here's an example using app.documents: 

 

var docs = app.documents;
for (var i = 0; i < docs.length; i++) {
    docs[i].packageForPrint(
        "file/path/for/package/folder",
        true, //copying fonts
        true, //copying linked graphics
        true, //copying profiles
        true, //updating graphics
        true, //including hidden layers
        true, //ignore preflight erorrs
        true, //creating report
    );

}

 

Known Participant
January 24, 2020

Thanks for the quick response, Bryan. I'm not sure how this works. Do i just run it as a script through Indesign?

brian_p_dts
Community Expert
Community Expert
January 24, 2020

Yes. https://indesignsecrets.com/how-to-install-scripts-in-indesign.php

 

You will need set the path in the first argument. You can create the folders on your desktop by using this version below. Or, use Folder("path") to set the path where you want to save to. 

 

var docs = app.documents;
for (var i = 0; i < docs.length; i++) {
    var fol = new Folder("~/Desktop/" + docs[i].name);
    if (!fol.exists) {
       fol.create();
    }
    docs[i].packageForPrint(
        fol,
        true, //copying fonts
        true, //copying linked graphics
        true, //copying profiles
        true, //updating graphics
        true, //including hidden layers
        true, //ignore preflight erorrs
        true, //creating report
    );

}