G’day scripters
I’m trying to print an illustrator CS6 document with a set printer, but as soon as I follow the illustrator scripting guidelines and add a printer, I get a ‘cannot print document’ error. Remove the printer name reference, and it prints fine.
Can anyone tell me what’s wrong please?
Regards
Santa
property theLargePagePrinter : "Quark Printer"
property largePaperSize : "A4"
tell application "Adobe Illustrator"
activate
repeat with pn in printers
set ActualName to name of pn as string
if ActualName is theLargePagePrinter then
set jobOptions to {class:job options, designation:all layers, reverse pages:true}
set paperOptions to {class:paper options, name:largePaperSize}
set printOptions to {class:print options, paper settings:paperOptions, job settings:jobOptions, printer name:ActualName}
print document 1 options printOptions
end if
end repeat
end tell
Model: Late 2014 retina i7, Yosemite
AppleScript: 2.4
Browser: Safari 600.2.5
Operating System: Other