Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

why can't disable print dialog?

Guest
Jan 25, 2010 Jan 25, 2010

I need print document to xxx.ps

My codes are : ( delphi code)

bsInDoc.PrintPreferences.ActivePrinterPreset := PStyle;

bsInDoc.PrintPreferences.PrintFile :=  'C:\pstest.ps';

bsInDoc.PrintOut(False,PStyle,False);

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)

printdialog.JPG

Anyone has idea about it?

P.S: this Indesign CS4 is Chinese version. and there are two black form is my delphi program.

TOPICS
Scripting
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2010 Jan 25, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 27, 2010 Jan 27, 2010
LATEST

Finally, I solve this problem.

The answer is so easy ,

PrintOut(False).

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.






Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines