Copy link to clipboard
Copied
Was wondering if it would be possible to create a Script that would take a Selection or image and re-size it proportionally into an 11"w x 8.5" H document and place it Centered in a 10.5" x 6" box located at the top of the page. If possible if it can detect the size as being less than 10.5" x 6" then don't scale, but if larger scale down to fit Proportionately.... Then Provide a dialog box that would let me enter my job # and today's date in a pre-determined location. I've attached a sample of what I'm trying to accomplish for the finished look. I'm also Assuming the base elements will need to reference a file (or template) that would contain the proofing information if so we'll call it "Proof_Temp.ai"
Huge thanks in advance for anyone that can assist...
Copy link to clipboard
Copied
assuming what you just pasted in is the exact code you're running, here are the issues.
You are running this command twice:
app.open(theFile).
Delete the second one.
on this line:
var theImg = docRef.pageItems[0];
the syntax is perfect, but you haven't defined "docRef". This line is going to fail because "docRef" is undefined.
Then the last line you posted:
artboards[0].artboardRect = [0,0,docSize[0],-(docSize[1])]
the variable "artboards" is undefined. this line will also give you an error.
here's how your snippet should look to do the basic task you're asking for:
var theFile = File('~/Desktop/Proof Sample.jpg');
app.open(theFile);
//set artboard size to image size
var docRef = app.activeDocument;
var artboards = docRef.artboards;
var theImg = docRef.pageItems[0];
theImg.left = 0;
theImg.top = 0;
artboards[0].artboardRect = [0,0,theImg.width,-(theImg.height)]
Copy link to clipboard
Copied
I have finally managed to complete this task and it's wonderful... No I'm in the process of tweaking it to add additional functionality...
Thanks to so many for all your help....
Copy link to clipboard
Copied
Hi read this and was wondering if it works? We do similar work but would like to create this in InDesign and with dimensions of image etc mentioned in inches.
Copy link to clipboard
Copied
I need something similar to allow my non-illustrator employees to produce proofs easily. I would be happy to hire someone to do this. Please contact me [Removed Email address by Moderator].
Please, Do not write any private information in public forum.