AI Plug-in Step by Step

1. Introduction

The Adobe Illustrator plug-in creates a javascript file from a saved design. This javascript file can then be "loaded" into an AI document. When the script is run within an AI document, all the objects from the design will be placed into the document in their proper locations. The process of loading a script into an AI document will be described in section 3.
Before using the AI plug-in tool we suggest you set up a location on your local machine to save the download designs. By default, the AI tool expects that you have each saved design in a folder within:
c:\weprint\saveddesigns\
You would then download the saved design folder to this directory. For example:
c:\ weprint\saveddesigns\ABCxxxxxxxxxx (where ABCxxxxxxxxxx is the saved design ID)

The AI plugin tool is used from within the printadmin page. You must log-in to the printadmin page. Once you are logged-in open a saved design. Once the design is opened, you can use the admin tasks to create an image file, create an AI script file, and zip the files into a folder for download.

2. AI Parameters

Scale Factor
The scale factor is used to scale the design objects from the size that is seen within the designer to the acutal size of your printable canvas. For example, the standard Adult tee that ships with the wePrint tool, has a printable area (on screen) of 350px X 400px. This is 1/4th the actual size of the garment (1400px X 1600px). The Scale Factordefaults to 4. For your particular medium you may find that a different scale factor is better (for example 3.8). You could set the scale factor to 1 and then do all you scaling from within AI.

Text Conversion
By default any text object in a design will be converted to an outline. You can choose to "Keep Text" as formatted text.
IMPORTANT: For best alignment you should convert the text to outlines. If you leave the text as formatted text, AI will place a larger bounding box around the text object. Also, the anchor point may be slightly different for text using a script font. The difference in the bounding box can create mis-alignments in the AI document when compared to the original design as seen in the wePrint tool. We suggest that you convert text to outlines, unless you need to edit the text once in AI. Also, sometimes arched text may be cut-off when placed into AI. In this case, you should keep the text as formatted text. Once in AI, select the text on the arched path and decrease the font slightly.
If you add new fonts to the gallery you need to run an AI font utility - see 3.4 below.

Symbol Conversion
By default any symbol that is placed in the design will be converted to an outline in AI. This is the simplest way to handle the symbols that are in the symbol gallery, since they are single color and it is straight forward conversion from a png to an vectorized outline.
However, if you add other symbols to the gallery that may not be straight-forward in the conversion, you can change this option to - "Keep Symbols as Raster Images". In this case, the symbols will be embedded into the AI document as a raster image. You can then manually convert them to vector outline as needed.

Symbol/Image Location
By default AI expects that any images that are in a design can be loaded from c:\weprint\savedesigns\ABCxxxxxxxxx\. If you are on a MAC, or do not have the directory as above, than you will need to change this parameter to - "Select from AI Interface". In this case, when you load the saved AI script into your AI document, you will be prompted to specify where the images are located for the design.

Figure 1. Admin Tasks Dialog Box
ai-screen1
Once you have the files created (image file and/or AI file), you can create a zip folder. This folder will include all the files required for the saved design. Click on the download link to download the file. Clicking the link should bring up a dialog box to save the zip folder to your machine. As suggested above, we suggest that you save the files to the c:\weprint\saveddesigns folder and then extract the files into a folder specific to that design (i.e. ABC123xxxxxxxxxx).

3. Loading File into AI

With the zip folder downloaded to your local machine, unzip the folder. You will now have a folder named ABCxxxxxxxx, which is the design ID. This folder will contain any of the files created from the steps above. If there are any symbols or images in the design, copies of these images will be included in this file. The steps outlined above will create a javascript file for the saved design. The file will be named - ABCxxxxxxxxxx-F.js. The "F" refers to a front design. A back design will have a "B" appended to the file name. If the design has a front and a back there will be a javascript file for each location.

3.1 Start with Blank Document
Open a new document in AI. The artboard needs to be set to the dimensions based on the design medium. For example, the Adult tee artboard should be 1400px by 1600px.
IMPORTANT: By default, AI places the origin at the lower left corner of the artboard. The wePrint Design Tool uses the top left corner as the origin. Therefore, you need to place the origin of the artboard at the top left corner.
It will obviously save time if you save your standard artboard sizes along with the correct origin for future use.

3.2 Load the Javascript
From the File Menu, choose Other Script. This will launch a dialog box in which you can use to locate the js file for your design. Once you locate the design, and Open it, the script will load the design onto the artboard. If there are images in the design and AI can not find the default image location, another dialog box will appear. Use this dialog box to find and select the saved design folder. AI will now be able to find and load any images into the document.

Figure 2. Scripts=>Other Scripts Menu Option
ai-screen2

Figure 3. Open Scripts Dialog Box
ai-screen2

3.3 Issue with Curved Text in the Downward Direction
When the design includes text that is curved (arched) downward. There is an extra step that may need to be taken. Figure 4 shows a design with text curved downward. The design tool curves the text below the line. AI by default, places the text above the line, see Figure 5. If the text seems to look different due to the placement, you can change the path alignment by going to Type => Type on Path => Type Options and changing the Align to Path option from Basline to Ascender. This change will place the text below the curve. See Figure 6.

Figure 4. Design with Text Curved Downward
ai-screen2

Figure 5. AI Default Placement of Text on a Path
ai-screen2

Figure 6. Changing the Path Alignment Option
ai-screen2

3.4 AI Fonts Utility
The font names in the drop-down menu are not a one-to-one correlation with the internal name of the font. For example, Arial is internally known as ArialMT. There is an xml file within the printadmin directory, AIfonts-conversion.xml, that translates the font name used in the wePrint Design Studio with the internal name required by AI. If you add fonts to your gallery, you will need to add a new font item to this xml file. In order, to find-out the internal names of the fonts on your system, there is a javascript file, AI-fonts.js, within the extras folder of the AI install folder. You can open this script file from within a blank AI document and AI will output into this document the names of all the fonts in your system. You then need to add the font-name/AI-font-name pair to the xml file.