i have a flow that runs script in save as : script file property of illustrator flow element.
incoming PDF opens in illustrator
saves out ai file in desired location
closes file that had been opened
but incoming PDF that triggers the open and save as script just sits there.
how do i pass the PDF through to data out folder? thanks
////////////////////////////////
exportFileToAI ("/Volumes/CNC/");
function exportFileToAI (dest)
{
var saveOptions = new IllustratorSaveOptions();
var ai8Doc = new File(dest);
saveOptions.compatibility = Compatibility.ILLUSTRATOR15;
saveOptions.compressed = false;
app.activeDocument.saveAs( ai8Doc, saveOptions );
}
file cleanup
Re: file cleanup
There are a couple of rules to be followed, and then all will be well:
https://www.enfocus.com/manuals/UserGui ... tions.html
https://www.enfocus.com/manuals/UserGui ... tions.html
Re: file cleanup
not understanding the rules. and how they are applied.
can you elaborate?
can you elaborate?
Re: file cleanup
You must use $doc instead of app.activeDocument. You must write the output in $outfolder and you must add the output file path to the array $outfiles. Without testing:
Code: Select all
var saveOptions = new IllustratorSaveOptions();
saveOptions.compatibility = Compatibility.ILLUSTRATOR15;
saveOptions.compressed = false;
var ai8DocPath = $outfiles + "/" + $filename + ".ai";
var ai8Doc = new File( ai8DocPath);
$doc.saveAs( ai8Doc, saveOptions );
$outfiles = [ai8DocPath];