Hi!
How I can get a list of printer color profiles? Same as in the print dialog. It is possible?
How to Get a list of Printer Color Profiles
-
- Posts: 29
- Joined: Sat Jul 30, 2016 3:52 am
- Location: San Francisco
Re: How to Get a list of Printer Color Profiles
I don't see a list of the print color profiles exposed in the document model (maybe it's under application?). I was only able to get the current active profile 
NOTE: Only works if "Color Handling" is set to "Photoshop Manages Colors" in the print settings. Otherwise the printer profile is false, and therefore will throw an error.

NOTE: Only works if "Color Handling" is set to "Photoshop Manages Colors" in the print settings. Otherwise the printer profile is false, and therefore will throw an error.
Code: Select all
// Get document Action Descriptor
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref);
// Get printer output object
var printerOutput = desc.getObjectValue( stringIDToTypeID('printOutput') );
try {
var printerProfile = printerOutput.getString( stringIDToTypeID('name') );
alert( printerProfile );
} catch(err) {
alert( 'Set Color Handling to Photoshop Manages Colors to get the current Printer Profile' );
}