The documentation seems to imply I can change which printer I'm printing to by setting the `printer` property on the PrinterPreset or PrinterPresets object:
printer | Printer Printer.POSTSCRIPT_FILE String | read/write | The current printer. Can return: Printer enumerator or String. |
I'm creating a new document and setting these properties at that time:
const doc = app.documents.add({
name: `ipsum`,
documentPreferences: {
....
},
viewPreferences: {
....
},
printPreferences: {
printer: "lorem",
....
}
});
This works for the other documented properties. However, InDesign seems to ignore the printer propterty. The printer is always the last used (selected by user) for that file or otherwise the application default. Not the one I'm specifying.
I confirmed that the printer I want exists using:
const printers = app.activeDocument.printPreferences.printerList;
console.log(printers);
I tried manually setting the printer name to the one I want:
printer: "RicohProd"
And instead it'll print to "BrotherFax", for instance.
Is there a way to do this? We're pulling the printer names from a database so I've only got the string to lookup by. If I have to figure out another way I will, but from experience with Acrobat scripting this feels like the way it should work.
Thank you.