Skip to main content
Participant
July 19, 2018
Answered

Print multiple documents through scripts

  • July 19, 2018
  • 2 replies
  • 3043 views

Hi,

I work in a publishing company as a Graphic technician and I need to print several separate files in Illustrator at the same time on a daily basis. I have tried to use actions to print the files but this doesn't really help as even with a recorded action, I still have to press the button Print to actually print the files. Is there a script that I can run that would print all the open files in Illustrator? I've seen other scripts that can save the files as PDF, but none that can print all the open files automatically. I'm not into scripting so I'm not sure how to write the actual script, but will try to add it in if any given a clue. Any help in this would be really great,

Thanks

This topic has been closed for replies.
Correct answer renél80416020

Thank you very much! This works brilliantly!!

Can I please ask if I can put in a line to save and close the open files after printing?

Thank you


Pour vous servir :

// JavaScript Document

#target illustrator

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

var closed = true;

function imprimtous(){

  var i, d;

      for(i = app.documents.length-1; i>-1; i--) {

        d =  app.documents[i];

        d.print();

        if (closed) {

          if (!d.saved) d.close(SaveOptions.SAVECHANGES);

          else d.close(SaveOptions.DONOTSAVECHANGES);

        }

      }

}

imprimtous();

de elleere

2 replies

CarlosCanto
Community Expert
Community Expert
October 19, 2020

Albert and Blake, try downloading the scripts again. The indexes were gone with the forum migration, I just fixed both scripts.

Larry G. Schneider
Community Expert
Community Expert
October 19, 2020

Thanks, Carlos

I forgot about the stripped indices,

CarlosCanto
Community Expert
Community Expert
October 20, 2020

yeah, we need to put those suckers back 🙂

renél80416020
Inspiring
July 22, 2018

Salut !

// JavaScript Document

#target illustrator

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

function imprimtous(){

     for(var i = app.documents.length-1; i>-1; i--) {

          app.documents[i].print();

     }

}

imprimtous();

de elleere

pdeshAuthor
Participant
July 23, 2018

Hi,

Thank you so much for responding. Could you please indicate where I need to put this script in? Would it be in Illustrator?

Thanks

Preeti

renél80416020
Inspiring
July 23, 2018

Pardon de répondre en français,

- utiliser l'extension .jsx (imprimtous.jsx)

- Pour le faire apparaitre dans la liste des scripts

Sous Windows 7 64bits et la version CS6,

C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Presets\fr_FR\Scripts

elleere