OS Venutra: Illustrator Printing

I’m having an issue with my printing scripts after the update to Ventura. I don’t quite understand what the issue is.

my printDocument(1, “p”, “1”)

on printDocument(pages, holdOrPrint, testMode)

set printerName to “printer”

tell application “Adobe Illustrator”

set theDocument to current document

tell theDocument

set jobOpts to {copies:pages}

set printOpts to {class:print options, printer name:printerName, job settings:jobOpts}

print theDocument options printOpts

close theDocument saving no

end tell

end tell

end printDocument

This is throwing errors now, and I see perhaps there were some changes to the system settings, but I can’t make sense of them.

I get this error:

Adobe Illustrator got an error: an Illustrator error occurred: 280 (‘’)

Code lines Tell to theDocument and end tell should be removed as I understand. Because the print options is object of Illustrator.app and not of current document. Also, it creates wrong reference theDocument of theDocument when printing.

Thank you for the idea. I’m still dying with the error in the printOpts part.

I feel like something changed there with ventura, but I don’t understand the documentation, or what is there is wrong.

Anyone have any ideas for me? Thanks in advance.


my printDocument(1, “p”, “1”)

on printDocument(pages, holdOrPrint, testMode)

set printerName to “printer”

tell application “Adobe Illustrator”

set theDocument to current document

tell theDocument

set jobOpts to {copies:pages}

set printOpts to {class:print options, printer name:printerName, job settings:jobOpts}

print theDocument options printOpts

close theDocument saving no

end tell

end tell

end printDocument