MiMoriarty

Trucos de diseño para diseñar como locos

How to automate PDF process in Indesign

For those designers that use Indesign’s engine to export a batch of layouts to PDF instead of Acrobat Distiller, here’s a useful script to process layouts in an automated fashion. The author of the script is Steve Wareham.

  • The script ask for the location of the layouts. That will be the same location in which to store the PDF.
  • La ejecución se detendrá si se habré un cuadro de diálogo modal en Indesign. Por ejemplo, si falta alguna fuente ó vinculo.
  • The execution will stop if a modal dialog box shows in InDesign. For example, at source or link failure.
  • All the pages contained in the documents will be processed.
  • The only parameter to be changed is the name of the preset used to process the PDFs:  myPDFpreset
//==== Batch PDF =====\\

/* InDesign JavaScript to Create PDFs of a batch of InDesign files using an export PDF preset */

var myPDFExportPreset = app.pdfExportPresets.item("myPDFpreset");

var myFileLocation = Folder.selectDialog("Please select path to files");

myFolder = new Folder ([myFileLocation]);

myFolderContents = myFolder.getFiles("*.indd"); // array

myFileAmount = (myFolderContents.length - 1);

// ===== Open, Export as PDF, and Close files ===== \\

for (i = myFileAmount; i >= 0; i--)

{

app.open(File (myFolderContents[i]));

app.activeDocument.exportFile(

ExportFormat.pdfType,

File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"),

false,

myPDFExportPreset

);

app.activeDocument.close(SaveOptions.no);

}
//==== Batch PDF =====\\/* InDesign JavaScript to Create PDFs of a batch of InDesign files using an export PDF preset */
var myPDFExportPreset = app.pdfExportPresets.item("ABE ALTA");var myFileLocation = Folder.selectDialog("Please select path to files");
myFolder = new Folder ([myFileLocation]);myFolderContents = myFolder.getFiles("*.indd"); // arraymyFileAmount = (myFolderContents.length - 1);
// ===== Open, Export as PDF, and Close files ===== \\ for (i = myFileAmount; i >= 0; i--){ 	app.open(File (myFolderContents[i]));	app.activeDocument.exportFile(		ExportFormat.pdfType, 		File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"),		false, 		myPDFExportPreset		);	app.activeDocument.close(SaveOptions.no);}

To find more information about this script you should visit the author’s website: www.stevewareham.com

About mimoriarty

Diseñador gráfico multidisciplinar; me gustaría trabajar y compartir experiencias con diseñadores de todo el mundo

One comment on “How to automate PDF process in Indesign

  1. Pingback: Tweets that mention How to automate PDF process in Indesign « MiMoriarty's Blog -- Topsy.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on November 9, 2010 by in multilanguaje, Trucos de diseño and tagged , , .

Top Rated

November 2010
M T W T F S S
« Oct   Dec »
1234567
891011121314
15161718192021
22232425262728
2930  
%d bloggers like this: