I need print document to xxx.ps
My codes are : ( delphi code)
bsInDoc.PrintPreferences.ActivePrinterPreset := PStyle;
bsInDoc.PrintPreferences.PrintFile := 'C:\pstest.ps';
While running this code, Indesign CS4 still raise a small dialog: ask fileName.
Print.out method has 3 Parameters:
PrintDialog: Whether to invoke the print dialog. Type: Boolean.
Using: Printer preset to use. Type: idPrinterPresetTypes enumerator or PrinterPreset.
WithGrids: Whether to print grids
so, I set first parameter = False, the printdialog should not be invoked by Indesign CS4.
But it does not, why？(refer to the figure as below)
Anyone has idea about it？
P.S: this Indesign CS4 is Chinese version. and there are two black form is my delphi program.
The function suppresses InDesign's own Print dialog, not the one your system calls up.
I think you get one from the system because you are printing to a file using your printer driver, rather than print to PostScript from InDesign.
Finally, I solve this problem.
The answer is so easy ,
Just fill first first parameter, do not care the other two parameter.
According to Indesign CS4 scripting document, it points out one thing is strange. Document says InDesign.PrinterPreset.PrintFile : The PostScript file to print to. Note: Valid only when the current printer is defined as postscript file. Then, I test setup PreinterPreset with postscript option or not, the result is same , Indesign will print document to .ps file. and I notice there is another method InDesign.PrintPreference.PrintFile has same definition. But, I do not figure out what is the difference between them.
Actually speaking, I hope adobe script document can apply more examples to help user to understand it.
Scripting can do a lot of smart things and saving manpower, what not let more user has scripting ability.
P.S: thanks a lot for Jonqware answer, your clue guide me to find correct answer.