Skip to main content
September 27, 2010
Question

generating package from indesign

  • September 27, 2010
  • 1 reply
  • 4772 views

Hi,

As we know there is an option in indesing for generating package for a file (File--->package).

Getting package is one of the part of my script i need to do for automation.

I searched for package option in javascript. I didnt get anything.

If u have any idea or solution please share with me.

Thanks and regards

Christy

This topic has been closed for replies.

1 reply

milligramme
Inspiring
September 27, 2010

Hi

This code below is works for me. InDesign CS4.

var to = new File("~/Desktop/package_folder/");
var flag = Folder(to).create();

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 ( flag === true){
    app.activeDocument.packageForPrint (
          to, 
          copyingFonts, 
          copyingLinkedGraphics, 
          copyingProfiles, 
          updatingGraphics, 
          includingHiddenLayers,
          ignorePreflightErrors, 
          creatingReport, 
          versionComments,
          forceSave
         );
}


siva k
Known Participant
September 27, 2010

Hello milligramme,

Your script is working well. Is it possible to add to your script export pdf, before creating package (for InDesign CS3)..?

Thanks in Advance.

Regards,

Siva

milligramme
Inspiring
September 27, 2010

Hello Siva

To export PDF with minimal argument

doc.exportFile (ExportFormat.PDF_TYPE, [File]);

this will export all pages with the document's current PDF Export Preset.

try more arguments

[, showingOptions, pdfExportPreset, withGrids, versionComments, forceSave]

and to controll pdf export options see those properties

app.pdfExportPreferences
app.pdfExportPresets

thanks,

mg