Create InDesign Package

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 255
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Create InDesign Package

Post by Terkelsen » Tue Oct 28, 2014 9:03 am

I'm looking for a way to have the InDesign configurator create an InDesign package. I guess I'll need a script to be run by the configurator. Any help?

freddyp
Advanced member
Posts: 587
Joined: Thu Feb 09, 2012 3:53 pm

Create InDesign Package

Post by freddyp » Thu Oct 30, 2014 5:48 pm

This will do the trick. Save it to a jsx file and use that file in the "Save" - "Use script" property of the Indesign configurator.



$outfile = $outfolder+"/"+$filename;

var to = new File($outfile);



var copyingFonts = true;

var copyingLinkedGraphics = true;

var copyingProfiles = true;

var updatingGraphics = true;

var includingHiddenLayers = true;

var ignorePreflightErrors = true;

var creatingReport = true;

var versionComments = "comment";

var forceSave = true;



if(($error == null) && ($doc != null))

{

try {

$doc.packageForPrint (

to,

copyingFonts,

copyingLinkedGraphics,

copyingProfiles,

updatingGraphics,

includingHiddenLayers,

ignorePreflightErrors,

creatingReport,

);

$outfiles.push($outfile);

}

catch(theError) {

$doc.close(SaveOptions.no);

$error = theError.description;

}

}

User avatar
Terkelsen
Advanced member
Posts: 255
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Create InDesign Package

Post by Terkelsen » Thu Oct 30, 2014 5:59 pm

I can confirm that this works just fine, Freddy. It even works with InDesign CC 2014 though this is not yet officially supported by Switch ;-)



However CC 2014 adds the possibility of saving both idml and PDF together with everything else in a package. Can anybody help to add these features to the script? This would even mean that you could turn off everything else and just save the idml, which I think is a much requested feature.



Obvious things to implement in a coming version of the InDesign configurator i.m.h.o.

User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Create InDesign Package

Post by gabrielp » Thu Oct 30, 2014 8:12 pm

Thanks for sharing this solution, Freddy. I will definitely try this out.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

If I've helped you and you'd like to say thanks, consider adding me on LinkedIn and leaving me an endorsement or recommendation. It helps a lot!

peterlk
Newbie
Posts: 1
Joined: Tue Mar 01, 2011 10:29 am
Location: Denmark
Contact:

Re: Create InDesign Package

Post by peterlk » Mon Nov 07, 2016 12:06 pm

Hi Freddy,

I'm looking for a InDesign CC2015 Server script, that will save an InDesign Package - can you twist the script you already made for InDesign?

Freddy - I got it - it works in InDesign Server 2015 too ;)

Post Reply