Illustrator Scripting :: How To Edit Script To Save The Files As SVG Instead Of PNG
Mar 13, 2013
I recently found the following jsx script, which saves a multi-layered IL file into 1-layer-per-file with PNG format.
This file is very useful, but i'm currently working on a project that requires the files to be saved into SVG format.
Is there anyway to edit this script to save the files as SVG instead of PNG?
// *** Export Layers as PNG files (in multiple resolutions) ***
//
// Version: 1.0 (29 Aug 2012)
// Copyright Arcticmill 2012
// www.arcticmill.com
// Developed by: Johan Otterud
//
// This script will export all layers that have a name starting with "#", or "%" into a subfolder of the current .ai document.
// These options can be configured below:
// *** Config options ***
var subFolderName = "Export";
[Code]...
Remember that you must add a "" + exportLayersStartingWith + "" (when exporting the layer cropped to it's bound) or "" + exportLayersWithArtboardClippingStartingWith + "" (when layer should be clipped to artboard) to the beginning of the layer name. Also make sure that they layers you want to export are not locked or hidden.");
} else {
// Show a completed message
alert(layersToExportCount + " layer(s) was successfully exported to:
" + exportDirectoryPath);
}
[Code]....
View 4 Replies
ADVERTISEMENT
Mar 19, 2013
I have some +900 legacy pdf's that need to have a title and date change. The pdf's where generated in ArcMAP 10 so the text appears as individual letters. So I wrote a script that creates a knockout and adds the required text. I can get this to work for an individual file but I can't figure out is how to have the script perform it for all the pdf's in a folder.
Set appRef = CreateObject("Illustrator.Application")
Set docRef = appRef.Open("C:WorkCity_Wide_Zoning�_Spring_2013TestA001.pdf")
' *************************
'Knockout
[Code]....
View 4 Replies
View Related
Oct 9, 2013
I have a VBA script that opens a .DXF file in Illustrator, and want to save it as an AI file. How do I do this?
View 14 Replies
View Related
Jul 9, 2013
When I save the file as EPS , I want to enable all the options in EPS Options Pallet. I have enabled all options except setting high resolution in Transparency option.
View 2 Replies
View Related
Nov 7, 2013
I'm trying to create a script to save a file that is already open in the same directory with a different name.
Example: nome_0000_art to nome_0000_closed
I tried to create from another script that saves EPS but as I am new to the subject could not make it work
how do I perform the command saveas automatically without showing the dialog window by changing the file name?
View 7 Replies
View Related
Sep 19, 2012
I am working on a plugin application, in that saving Image files on a specific location by using JSX file.I have done with that but it works only with local drive.I want to save that file on my Network Share by using JSX.
View 10 Replies
View Related
Jan 14, 2014
So I deal with a lot of files each day that need to be saved according to their lead code, meaning that there is a folder that holds thousands of sub folders that have the same name as this lead code on a server.
So since I have the lead code in the file name I'm trying to use that in conjunction with the file path to tell illustrator where to save it with Javascript. Also the idea of a dynamic save path is useful.
Here's what I've got so far, it's not working yet but I feel like I'm close.
/*/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Dynamic Save Path////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////*/
#target illustrator
[Code] ......
View 1 Replies
View Related
Oct 8, 2012
I want to save Current open Document on remote location (on server).
I am able to save it on my local machine(the machine i am presently working on).
Now I want to save it on some remote server.
I am using following code for that:
var doc=app.activeDocument();
var aiSaveOptions1=new IllustratorSaveOptions();
var aiFile1 = File( '/osn-pc-16/adobe/1/Original.ai' );
doc.saveAs(aiFile1,aiSaveOptions1)
View 7 Replies
View Related
Sep 12, 2012
So I'm using a script that I wrote to bring in files that were converted from CorelDraw to EPS (this is the best conversion process to preserve text and drawing assets). Basically the script takes the art in the EPS, groups it, places a rectangular border around the art and centers them. We do this so that they come into InDesign correctly sized. The problem is, it used to be 100% automated, just about, however now the saveas action command will not remember that "Save as PDF Compatible" needs to be set to true. When I do a saveas command, it's check by default, but when the saveas command is batched, it does NOT do it that way. When I try to bring batched AIs into InDesign, it's text that says it was not saved as PDF Compatible. Am I going to have to script a save function to get control of the saveas settings? I don't understand why PDF compatible is checked by default, yet batching saveas saves as if it unchecked it.
View 5 Replies
View Related
Jul 19, 2012
Is it possible to save illustrator XMP thumbnail previews by artboard? It seems like Illustrator saves a single thumbnail with all art regardless of the number of artboards.
If there is a property that can be set to save multiple thumbnails to the XMP packet by artboard when saving to a native Illustrator file?
View 3 Replies
View Related
Mar 24, 2012
I'm using Illustrator for work and I love it, I never needed scripts yet. Now I have couple houndred svgs coming in per day, I would like to have a script that opens every svg one by one in the selected directory and add them to a pdf as pages of the same size and than save it.
How many files I could put in 1 pdf this way?
I'm using Illustrator CS5 on Win7 x64.
View 7 Replies
View Related
Oct 14, 2013
Is there any chance to assign values to an artboard?
I've experimented with “tags”, but they only work for pageItems. (if the item which includes the stored data is deleted, the data is also deleted)
It is simple data like v1=true, v2=false, … I want to assign. And it needs to be saved within the illustrator document.
View 4 Replies
View Related
Oct 8, 2012
I want to open a "Save File Dialog " with some default path.Like when user run that script I want to open a "Save As" dialog box with default path "/Volumes/<shared name>/<folder name>/.. ."I am using File.SaveDialog(prompt, filter);
but it doesn't open to the location by default that I want to open.
View 2 Replies
View Related
Apr 16, 2013
I tried following action script code to save PDF file with color profile attached:
var saveOps: PDFSaveOptions = new PDFSaveOptions();
saveOps.colorConversionID = ColorConversion.COLORCONVERSIONTODEST;
saveOps.colorDestinationID = ColorDestination.COLORDESTINATIONWORKINGCMYK;
saveOps.colorProfileID = ColorProfile.INCLUDEDESTPROFILE;
doc.saveAs(pdfFile, saveOps);
But got following errors: error an Illustrator error occurred: 1346458189 ('PARM'). What is the correct way to save PDF file with color profile?
View 1 Replies
View Related
Oct 13, 2013
How can I move pictures without losing history (exposure changes, crop changes, etc)? I have LR4 and am using DNG files. No matter how I move files (move the folder within LR, move the folder than then re-sync in LR, etc) it always loses the History. I've searched and have found numerous "tutorials" on how to properly move files but can't seem to be able to keep the History along with it (I get the last state of the image, but not the actual history itself).
View 2 Replies
View Related
Jul 25, 2013
I'm using Illustrator CS6. I have an artboard with 200 of the same placed file. I now want to use this same layout for 30 other views, they are the same size, but different images. If I relink them I have to click through each one. I tried using a script I found on here by Carlos:
#target Illustrator
// script.name = relinkAllSelected.jsx;
// script.description = relinks all selected placed images at once;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11;
// script.elegant = false;
[code].....
and I get an
error 25: Expected: }.
Line:10
-> p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Times}
I'm on a mac, os x 10.6.8. and I copied the script into the script preset folder so its starting from the drop down menu. Don't think I'm leaving anything out. I'm swapping 1 placed(linked) PDF for another.
View 5 Replies
View Related
Oct 11, 2012
There is no way to export PNG-files with a higher PPI than 72. I saw a thread that you could scale the pictures when exporting then script to open Photoshop and resize them? This is the last step in my big script and if i cant get this to work i cant use it.
View 3 Replies
View Related
Nov 25, 2012
I found a script that does the job, export tones of ai files to pdf, but I have some files which are in sub folders, and I was trying to find a way to modify this script to include subfolder, but no luck.
Adobe permits you to use, modify, and distribute this file in accordance with the termsof the Adobe license agreement accompanying it. if you have received this file from a source other than Adobe, then your use, modification,or distribution of it requires the prior written permission of Adobe.
This sample gets files specified by the user from the selected folder and batch processes them and saves them as PDFs.
Edits by Patrick Mineault:
- only .ai files processed
- files saved in same folder as the input files
- export files have name (oldname).pdf
- PDF settings: editable / acrobatLayers=true for maximum compatibility with Preview
// Main Code [Execution of script begins here]
// uncomment to suppress Illustrator warning dialogs
// app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts;
// Select the source folder.
sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
[code]...
View 11 Replies
View Related
Jul 6, 2013
Is there a way to open a file as a layer? I want to open multiple files in the same window to make a collage. Currently, as I open each file they all open in separate windows. The "Open Document As Tabs" option in the User Interface preferences is not selected.
View 1 Replies
View Related
Mar 8, 2013
I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?
View 6 Replies
View Related
May 5, 2012
I would like make a config file for my script that i would like to put in the %appdata%adobe folder.
How can i reah the value of %appdata% inside javascript?How do i create and read files?
I am currently reading the Extendscript javascript toolsguide but i cant figure out how to create a file:
Should not this code create a file in C: directory?
Fille = new File('C: est.txt');
Fille.write("Testwriting!");
Fille.close();
View 10 Replies
View Related
May 17, 2012
How to save files with spaces insted of dashes in Save for Web dialog window in Illustrator CS6?
View 9 Replies
View Related
Apr 29, 2011
What would be the best strategy on the usage of data set to translate our product packaging. It's quite complex as we have several languages on the same packaging. Moreover, we have different text sources that would require to be translated in different sets of languages.
I have already looked into the data set and I tried to get familiar with it. How to create the data set and how to name the different variables knowing that there are different source texts for a particular region (region means a set of languages) and other texts for another region... The idea is to export this into one XML file with well identified elements that can be split with a tool, sent for translation according to their region then merged back into one single file to be imported back into illustrator
Region 1:
en-US
text 1
text 2
fr-FR
text 1
text 2
de-DE
etc...
Region 2:
en-US
text 3
text 4
ru-RU
text 3
text 4
Region 3:
etc..
It seems that the formatting such as bold, italic and so on is not exported into the data set which is quite embarrassing.
View 9 Replies
View Related
Jun 13, 2013
It is supposed to change hyphens to en-dashes in a ai files in a folder. However, when I run it, it only works on one file. After it makes the change and closes the first file, it stops.
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts;
sourceFolder = Folder.selectDialog;
if ( sourceFolder != null )
{
files = new Array();
fileType = "*.ai";
files = sourceFolder.getFiles( fileType );
if ( files.length > 0 )
[code]....
View 6 Replies
View Related
Feb 6, 2014
I have about 300+ product labels that are in Illustrator, and some of them have an incorrect rich black color swatch. What I have been doing is going through and changing the color pallette to change them manually. Essentially going to the instance of black and changing them to regular black.
Is there any sort of script that can do this? The files are in CMYK.
Otherwise I have a lot of monotonous file editing to do.
View 4 Replies
View Related
Nov 20, 2012
I need to find a way to convert a LOT of ai files, individually, to low res pdf's. Preferably with the presets I want, not some defaults. I'm not interested in an action. I was hoping for a droplet, script, or something similar.
I did find this and it looked promising... [URL] ....
That almost worked. Ultimately, for some reason, it couldn't see the ai files sitting in the specified folder.
Running CS5 with MacOS 10.8.2
View 2 Replies
View Related
Nov 4, 2013
Is it possible to have a script that would split up an Illustrator file that contains a number of groups of elements into individual files... for example, here is a download link for a file that has different types of moustaches and I want each moustache as an individual file... I have hundreds of Illustrator files like this that have 4, 8, 15, 20 or more illustrations all bunched onto the one file that I need to split up. I'm using CS4 [URL]....
View 3 Replies
View Related
Sep 7, 2012
I'm aiming to take RAW photo files, edit them in a wide color space, and when posting them to the web, save them as sRGB.
My workspace is as follows:
I open RAW files in Photoshop via ACR as 16-bit ProPhoto smart objects. When I finish editing them, I use "Save for Web" with the "Convert to sRGB" and "Embed Color Profile" boxes checked.
Photoshop and Bridge tell me the profile in photos saved as such is sRGB as expected. When I upload to a site like flickr, however, the metadata says the photo is still in ProPhoto. See an example here: [URL]...If I use "Convert to Profile" and change it to sRGB, then upload to flickr, the metadata says the photo is in sRGB, as it should be.
View 22 Replies
View Related
Feb 2, 2012
To print all open windows in Illustrator CS5 (or illustrator files in a folder) then close the files.
View 12 Replies
View Related
Mar 20, 2012
I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?
View 7 Replies
View Related
Feb 11, 2013
I have 30 separate illustrator pdf files (one page each) that I would like to make into one Illustrator CS6 file with 30 artboards. Is there any way to do that without having to import one by one?
View 1 Replies
View Related