Using Printer Presets; Creating Printer Presets From Printing Preferences - Adobe 27510753 - InDesign CS2 - PC Manual

Scripting guide
Hide thumbs Also See for 27510753 - InDesign CS2 - PC:
Table of Contents

Advertisement

Adobe InDesign CS2 Scripting Guide
profile = Profile.postscriptCMS;
}
catch(e){}
//--------------------------------------------------------------------------------
//Properties corresponding to the controls in the Advanced panel of the
//Print dialog box.
//--------------------------------------------------------------------------------
opiImageReplacement = false;
omitBitmaps = false;
omitEPS = false;
omitPDF = false;
//The following line assumes that you have a flattener preset named "high quality flattener".
try{
flattenerPresetName = "high quality flattener";
}
catch(e){}
ignoreSpreadOverrides = false;
}

Using printer presets

To print a document using a printer preset, include the printer preset in the print method:
//PrintDocumentWithPreset.jsx
//An InDesign CS2 JavaScript
//Prints the active document using the specified printer preset.
//Assumes you have a printer preset named "myPreset" and that a document is open.
app.activeDocument.print(false, app.printerPresets.item("myPreset"));

Creating printer presets from printing preferences

To create a printer preset from the print preferences of a document:
//CreatePrinterPreset.jsx
//An InDesign CS2 JavaScript
//Creates a new printer preset.
//If the preset does not already exist, then create it;
//otherwise, fill in the properties of the existing preset.
var myPreset;
myPreset = app.printerPresets.item("myPreset");
try{
myPreset.name;
}
catch(myError){
myPreset = app.printerPresets.add({name:"myPreset"});
}
with(app.activeDocument.printPreferences){
//Because many printing properties are dependent on other printing properties,
//we've surrounded each property-setting line with try...catch statements--
//these will make it easier for you to experiment with print preset settings.
try{
myPreset.printer = printer;
}
catch(e){}
try{
myPreset.ppd = ppd;
}
catch(e){}
try{
myPreset.copies = copies;
}
Working with Documents in JavaScript
133

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs2

Table of Contents