Create InDesign Package
Create InDesign Package
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?
Create InDesign Package
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;
}
}
$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;
}
}
Create InDesign Package
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.
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.
Create InDesign Package
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
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Re: Create InDesign Package
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
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
Re: Create InDesign Package
Hello together,
thanks for that great script. I have expanded it with the function to produce of an IDML. But there is still one naming problem which I can't solve.
The target INDD-file inside the output folder still has the individual job-prefix of Switch (unique name). The "Strip unique name" doesn't work - I think it's because the script takes unique name of the InDesign-File in the Switch flow.
Are there any ideas? I think the Rename-element one solution but i would be better to pick the proper name inside the script.
Thanks in advance,
Peter
thanks for that great script. I have expanded it with the function to produce of an IDML. But there is still one naming problem which I can't solve.
The target INDD-file inside the output folder still has the individual job-prefix of Switch (unique name). The "Strip unique name" doesn't work - I think it's because the script takes unique name of the InDesign-File in the Switch flow.
Are there any ideas? I think the Rename-element one solution but i would be better to pick the proper name inside the script.
Thanks in advance,
Peter
Media asset and production specialist
Group Communications / System Operations
Phoenix Contact GmbH & Co. KG
www.phoenixcontact.com
Group Communications / System Operations
Phoenix Contact GmbH & Co. KG
www.phoenixcontact.com
Re: Create InDesign Package
If you use $infile you get the name without the prefix.
Code: Select all
var fileName = $filename.replace(".indd",".idml");
$doc.exportFile("InDesign Markup (IDML)",$outfolder+"/"+fileName);
$outfiles = [];
$outfiles.push($outfolder+"/"+fileName);