This information was given to me from Adobe Tech Support on this printing issue… I’ve not been able to figure out how to get my printer settings yet, but perhaps someone will help figure it out…
You can customize the Photoshop print settings, such as Color Management, by defining the printSettings paramaters for your document before using printOneCopy() or print(). Here is a basic list of your options:
————————————-
var docRef = app.activeDocument;
docRef.printSettings.caption = true/false;
docRef.printSettings.labels = true/false;
docRef.printSettings.cornerCropMarks = true/false;
docRef.printSettings.centerCropMarks = true/false;
docRef.printSettings.colorBars = true/false;
docRef.printSettings.regMarks = true/false;
docRef.printSettings.negative = true/false;
docRef.printSettings.flip = true/false;
docRef.printSettings.interpolate = true/false;
docRef.printSettings.vectorData = true/false;
docRef.printSettings.hardProof = true/false;
docRef.printSettings.mapBlack = true/false;
docRef.printSettings.printSelected = true/false;
var bgColor = new SolidColor;
bgColor .rgb.red = xxx;
bgColor .rgb.green = xxx;
bgColor .rgb.blue = xxx;
docRef.printSettings.backgroundColor = bgColor;
docRef.printSettings.renderIntent = Intent.PERCEPTUAL/intent.SATURATION/ intent.RelativeColorimetric/intent.intent.AbsoluteColorimetr ic;
docRef.printSettings.printBorder = xx;
docRef.printSettings.bleedWidth = xx;
// Format for setPagePosition(DocPositionStyle, X (optional), Y (optional), scale (optional))
// DocPositionStyle.USERDEFINED
// DocPositionStyle.PRINTCENTERED
// DocPositionStyle.SIZETOFIT
docRef.printSettings.setPagePosition(DocPositionStyle.USERDE FINED, 1.5,
2.0);
————————————-
If necessary, you can also get the list of printers and the current printer using code similar to the following:
————————————
var currPrinter = docRef.printSettings.currentPrinter;
var message = "Printer is: " + currPrinter;
alert(message);
printers = docRef.printSettings.printers;
message = "Printers are: " + printers;
alert(message);
————————————-
For more information about the above options, search for the print function and printSettings in the Photoshop CS4 JavaScript reference PDF.
You cannot, unfortunately, change settings at the operating system level using JavaScript. This means that you are unable to set your printer preset.
To control the settings that are used in the printer’s dialog, set these in the system by doing a print with the settings before running the Photoshop automation. You should be able to do this in Photoshop or in another application on your system; whichever is more convenient for your workflow. (Print settings that you select in Mac OS typically carry over to each new printing session, regardless of the application.)
Alternatively, you can use AppleScript to set the printing preset to use, and then run the JavaScript. With a quick search of the internet, I located the following web pages that discuss methods for setting a printer preset using AppleScript:
<
http://forums.macosxhints.com/archive/index.php/t-74787.html>
<
http://www.macosxhints.com/article.php?story=200703121006202 42>
You can use AppleScript to call a .jsx file as well by adding a command similar to the following the the end of the AppleScript file:
————————————-
do javascript printInCS4.jsx
————————————-
For more information about using AppleScript with Photoshop, see the AppleScript Ref PDF that should be located in the /Applications/Adobe Photoshop CS4/Scripting/Documents/ folder. For more information about AppleScript, please access the following URL:
<http://www.apple.com/applescript/>