Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Copy selection to a new document

$
0
0

Here is a break down of what I am wanting to accomplish....any guidance would be appreciated!

 

1. User will select items (text frames, compound path items, path items)

2. User will run a script that will do the following....

     1. Open a new document (8.5" x 11") with RGB color

     2. Anything with a fill color should get gray color 100% fill applied

     3. Anything with a stroke color should get gray color 100% stroke applied

     4. Then save a .ai file and a .pdf file in the following format.....

 

#target illustrator


var doc = app.activeDocument;
var fileName = doc.name;
var jobName = (fileName).substr(0, 11);
aiFile = "D:\\Jobs\\"+jobName+"\\AI\\Cover Page.ai" 
pdfFile = "D:\\Jobs\\"+jobName+"\\PDF\\Cover Page.pdf" 


var newaiFile = new File(aiFile); 
doc.saveAs (newaiFile);  
var pdfOpts = new PDFSaveOptions();     
pdfOpts.pDFXStandard=PDFXStandard.PDFXNONE; 
pdfOpts.compatibility = PDFCompatibility.ACROBAT5;     
pdfOpts.preserveEditability = false; 
var newpdfFile = new File(pdfFile);     
doc.saveAs(newpdfFile, pdfOpts);

Viewing all articles
Browse latest Browse all 12845

Trending Articles