Copy link to clipboard
Copied
I've done some research on this but cant get it to work quite right.
So I basically have a Master Illustrator file which has one A4 art board which has a back and front view of a t shirt plus other customer information, and then two smaller artboards which are overlaid, one around the front view, and one around the back view of the t shirt.
So I essentially need to export a load of different file from this master file, that I currently do manually, adding certain suffixes after each file. And I'm wondering if this is doable with actions.
I need to:
-Save the Master File
-Export a PDF of the large artboard containing all information giving it the suffix _ProductionWorksheet
-Export one of the smaller artboard as a JPG with the suffix _FrontView
-Export the other smaller artboard as a JPG with the suffix _BackView
Id like to create a template file that does all this and place it in a folder - so i can then copy paste that folder for any new clients, rename it, and basically have a one button self save/updater.
I have tried to do this but the saving seems to all happen in the original file location and wont change to do it inside wherever the Master file is stored.
If anyone could help that would be a great help, as I'm currently doing all this manually and takes some time.
Copy link to clipboard
Copied
Setup all of your artboard sizes first.
-Create a New Action to begin recording
-Do a Save As Adobe PDF, click range, and select 1 to 1 (which is your first artboard).
-Enter your desired name for the file, such as "Master Page 1" in the Save As dialog.
-BEFORE clicking save, navigate to the file location you want to save it to.
-Click Save.
Repeat the exact same steps above for the other two pages (front) and (back).
Finally, click the stop button in your Actions palette.
Now, save the file as a template in the same location you wanted to save your separate artboards.
When you play the action, it should save out your different artboard sizes with their own file names in the desired location you indicated.
NOTE: If you duplicate the folder, the PDF's generated will still save to the same spot as your original file where you created the native Action script.
Therefore, it may make more sense to setup this template to save PDF's to your desktop so that you can manually drag them to the correct folder location.
Copy link to clipboard
Copied
This is as far as I got, however is the saving that messes things up. When duplicating the file it always defaults to the original location.
So I set up template customer with my template in and set it up to save out all my files, works perfect. Then when I duplicate it and call it Customer X the open that template and try to save out it will just keep saving into the original template customer folder.
I need the files to save into each individual customer. So when i open Customer X and use that master file i need the files to save into Customer X. Duplicate template and call it Customer Y, I now need the files to save into Customer Y folder etc etc
Is there any way to get it to save where the file individual open is stored?
Copy link to clipboard
Copied
"Is there any way to get it to save where the file individual open is stored?" - No, not that I am aware of. Actions record as steps, so it only saves files to the location that you navigated to when recording it.
Copy link to clipboard
Copied
OK I've got something working, seems to do the trick, albeit a little messy i guess. Can anyone see any streamline improvements i could make?
var activeDocument = app.activeDocument;
activeDocument.save;
var aiFile = activeDocument.fullName;
var jpegFolder = Folder(app.activeDocument.path);
for (var j = 0; j < activeDocument.artboards.length; j++) {
var activeArtboard = activeDocument.artboards
activeDocument.artboards.setActiveArtboardIndex(j);
var bounds = activeArtboard.artboardRect;
var left = bounds[0];
var top = bounds[1];
var right = bounds[2];
var bottom = bounds[3];
var width = right - left;
var height = top - bottom;
if (app.activeDocument.rulerUnits == RulerUnits.Points) { //Add more if for more conversions
width = width / 72;
height = height / 72;
}
var fileSuffix = ["_ProductionWorksheet.pdf", "_FrontView.jpg", "_BackView.jpg" ];
var fileName = activeDocument.name.split('.')[0] + fileSuffix
var destinationFile = File(jpegFolder + "/" + fileName);
var type = null;
if(j != 0){
type = ExportType.JPEG;
var options = new ExportOptionsJPEG();
options.antiAliasing = true;
options.artBoardClipping = true;
options.optimization = true;
options.qualitySetting = 100; // Set Quality Setting
activeDocument.exportFile(destinationFile, type, options);
activeDocument.close();
app.open(File (aiFile));
} else if (j == 0){
var options = new PDFSaveOptions();
options.compatibility = PDFCompatibility.ACROBAT5;
options.generateThumbnails = true;
options.preserveEditability = false;
activeDocument.saveAs(destinationFile, options);
activeDocument.close();
app.open(File (aiFile));
}
}
Copy link to clipboard
Copied
Cross posted here:
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more