Hey guys
Been following your Posts on this subject has i use illustrator a lot but never needed to script the print dialog.
Anyhow here’s my attempt at scripting this problem…
Gotta say i think i’ve had some success but this may just be my machine and my settings…
some of the options are not needed but you can delete as you see fit
set filePath to alias "ai file on desktop tec.. etc.."
tell application "Adobe Illustrator"
set docname to get the name of the current document
set FullPath to filePath & docname & ".ps" as Unicode text
set |Adobe PostScript® File| to "Adobe PostScript® File" as Unicode text
set |Adobe PDF| to "Adobe PDF 7.0" as Unicode text
set |paper options| to {class:paper options, height:1000.0, name:"custom", offset:1000.0, transverse:true, width:1000.0}
set |page mark options| to {class:page marks options, registration marks:false, color bars:false, page info marks:false, trim marks:false}
set |color management options| to {class:color management options, name:"[Default]"}
set |color separation options| to {class:color separation options, separation mode:host based separation, over print black:false}
set |coordinate options| to {class:coordinate options, fit to page:true, horizontal scale:100.0, vertical scale:100.0, orientation:landscape, tiling:single full page}
set |flattening options| to {class:flattening options, clip complex regions:false}
set |postscript options| to {class:postscript options, binary printing:true}
set |job options| to {class:job options, bitmap resolution:0.0, collate:false, copies:1, designation:all layers, file path:FullPath, name:"untitled-1.ai", print area:artwork bounds, print as bitmap:false, reverse pages:false}
set |print options| to {class:print options, printer name:|Adobe PostScript® File|, PPD name:"Adobe PDF 7.0", job settings:|job options|, paper settings:|paper options|, page marks settings:|page mark options|, color management settings:|color management options|, coordinate settings:|coordinate options|, color separation settings:|color separation options|, postscript settings:|postscript options|}
print current document options |print options| --without dialogs
close current document saving no
end tell
seemed to work better for me when i put the job options in the same order has they were in the illustrator dictionary…
Hope it helps
cheers
this was tested on illustrator cs2