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
1 Correct answer
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
Explore related tutorials & articles
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
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
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
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
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
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
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!
Copy link to clipboard
Copied
I got the same thing as well. Would really love for this to work, it would be amazing.
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?
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.
Copy link to clipboard
Copied
Thanks, Carlos
I forgot about the stripped indices,
Copy link to clipboard
Copied
yeah, we need to put those suckers back 🙂
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!

