Highlighted

Print multiple documents through scripts

Community Beginner ,
Jul 19, 2018

Copy link to clipboard

Copied

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

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

TOPICS
Scripting

Views

987

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Print multiple documents through scripts

Community Beginner ,
Jul 19, 2018

Copy link to clipboard

Copied

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

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

TOPICS
Scripting

Views

988

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 19, 2018 1
Enthusiast ,
Jul 22, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 22, 2018 2
Community Beginner ,
Jul 23, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2018 0
Enthusiast ,
Jul 23, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2018 1
Community Beginner ,
Jul 23, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2018 0
Enthusiast ,
Jul 23, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2018 1
Community Beginner ,
Jul 24, 2018

Copy link to clipboard

Copied

This is perfect!! Thank you so very much, for taking out the time and sending the script twice. Merci beaucoup

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 24, 2018 0
New Here ,
Sep 21, 2020

Copy link to clipboard

Copied

Hi, I did not manage to making it work. It returns

Error 302: No such element

Line :17

->       d.print();

 

I wonder what I did wrong!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 21, 2020 0
Community Beginner ,
Oct 19, 2020

Copy link to clipboard

Copied

I got the same thing as well.  Would really love for this to work, it would be amazing.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2020 0
Adobe Community Professional ,
Oct 19, 2020

Copy link to clipboard

Copied

Do you have a printer connected, marked as default and turned on? Does it have a print queue or are you printing directly? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2020 0
Adobe Community Professional ,
Oct 19, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2020 1
Adobe Community Professional ,
Oct 19, 2020

Copy link to clipboard

Copied

Thanks, Carlos

I forgot about the stripped indices,

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2020 1
Adobe Community Professional ,
Oct 19, 2020

Copy link to clipboard

Copied

yeah, we need to put those suckers back 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2020 0
Community Beginner ,
Oct 20, 2020

Copy link to clipboard

Copied

Thank you, that worked, it's now printing!

I am getting this error though (even though they all print):  

Error 1200: an illustrator error occured: 1346458189 ('PARM')

Line: 23

->           else d.close(SaveOptions.DONOTSAVECHANGES);

 

I wonder, is there a way to control the order that it prints, such as: from left to right, or from numerical/alphabetical order?

 

Thanks again!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2020 0