Skip to main content
danielm75370885
Participant
August 1, 2019
Question

Printing from panel

  • August 1, 2019
  • 1 reply
  • 486 views

I am attempting to print a file from my panel before closing it.

Here is the print script:

function Print () {

if(app.documents.length > 0){


var opts = new PrintOptions();

opts.printerName = 'Art Laserjet';

opts.printPreset = '[Default]'


app.activeDocument.print(opts);

  }

}

This works fine when I run from the ExtendScript Debugger in VSCode. When I attempt to run this from my panel, I get an error alert from Illustrator, "Can't Print the illustration. The Color Management settings are inconsistent."

I've attempted to add PrinterColorMangementOptions to the PrintOptions var, but they didn't seem to make a difference. Maybe I just did it wrong? Anyone have any experience with this? I can provide more code if needed.

EDIT my console is feeding me: "Error: an Illustrator error occurred: 300 ('')" . Hopefully this helps get me an answer

This topic has been closed for replies.

1 reply

erinferinferinf
Adobe Employee
Adobe Employee
August 16, 2019

Hi danielm75370885

   What happens if you run your panel from ExtendScript Toolkit instead of the Debugger?

Which version of Illustrator? Have you tried different versions of Illustrator? Or different printers? Perhaps they'd throw different errors...  Also which OS are you running?

I'll see if someone on the Illustrator team can help out...

- Erin