Setting the screen angle and frequency in ExtendScript
I am revisiting an issue that has always vexed me: Setting the angle and frequency of halftones in ExtendScript.
There appear to be two places where this can be set:
- in a PrinterPreset
- in PrintPreference
I'd prefer to use the latter, but every time I attempt to do so:
var mydpp = document.printPreferences;
mydpp.blackAngle = 75;
mydpp.blackFrequency = 65;I am immediately stopped at the `mydpp.blackAngle` assignment with the error message: "The property is not applicable in the current state." Is there any way to make this work?
The reason I cannot use the `PrinterPreset` method is because it overwrites other settings. Given the following example:
var mydpp = document.printPreferences;
var tempPreset = app.printerPresets.add({name:"tempPreset"});
tempPreset.blackAngle = 75;
tempPreset.blackFrequency = 65;
mydpp.activePrinterPreset = tempPreset;
mydpp.printFile = new File("somevalidfilehere.ps");
The moment that last line is executed, all the settings in `tempPreset` are lost because `mydpp.activePrinterPreset` is now set to nothing instead of `tempPreset`.
However, if I swapped those last two lines so that we assign the `activePrinterPreset` after `printFile`, then the moment `activePrinterPreset` is assigned, everything else gets lost, including `printFile`. It's incredibly frustrating, thus the reason why I'd prefer to set the Angle and Frequency directly on PrintPreference rather than through a PrinterPreset.
Any ideas?
