Okapi ComponentsIllustrator Filter |
|
- Overview |
The Illustrator Filter is an Okapi component that implements the Okapi Filter Interface for Adobe Illustrator files.
#eps
supports Encapsulated PostScript files (.eps)This filter uses Illustrator's scripting capability to access the translatable text, therefore you must have a valid copy of Adobe Illustrator CS (i.e. version 11) installed on your machine to be able to run this filter.
The properties for the Illustrator Filter are the following:
Property | This Filter |
---|---|
INPUTFILE | Yes |
INPUTSTRING | No |
BILINGUALINPUT | No |
TEXTBASED | No |
OUTPUTFILE | Yes |
OUTPUTSTRING | No |
ANCILLARYOUTPUT | Yes |
XMLOUTPUT | No |
RTFOUTPUT | No |
USEKEY | No |
ISINDEMOMODE | No |
Important:
When you use this filter, it uses Illustrator.
- If Illustrator is already open when the filter starts, that instance of
Illustrator is used.
- If Illustrator is not open when the filter starts, the filter starts a new
instance of Illustrator in hidden mode, and Illustrator
is kept open until the filter is closed. If you open Illustrator manually
while the filter is open, the copy of Illustrator you will be using is the same
as the filter's copy. So if you close manually this copy of Illustrator you will
close the filter's copy and the next time you try to use the filter you will get
an error about RPC Server not being available. If it happens: simply restart the
application that uses the filter (e.g. Rainbow).
The filter uses the Illustrator Scripting engine to access and manipulate the text. There are a number of issues related to Illustrator scripting that cause problems for which the filter cannot do much about. Some of them are:
An Illustrator error occurred: 123 ('PARM')
"
where 123
is some number. This error seems related to
memory leaks in Illustrator (see
http://www.noah.org/python/com/illustrator/).
It seems to occur randomly regardless the number of the files processed.
Sometimes moving the order in which the files are processed seems to help.
There is currently no workaround for this issue: you need to re-process the
files on which the error occurred (the files where the error did not
occurred should be OK).My Example.ai
" will be "My-Example.ai.jpeg
"
instead of "My Example.ai.jpg
". This is because Illustrator
forces filenames without spaces.Make sure to report any other problem you run into.
The filter extracts all the text frame objects for each story in the Illustrator file. The extraction order is the one of the file and may not correspond at all to the visual layout. Hidden layers, empty text frames, and text frames with only inline codes are never extracted.
Important:
The filter does not support the extraction of formatting codes. So any text
formatting (bold, italics, etc.) done inside a text frame is lost when writing
back the file.
Illustrator CS files work with Unicode text at the filter level. Any input encoding defined by the user is ignored.
Soft return are treated as inline codes. the filter adds a special marker ("[$SR$]
")
followed by a line-break. This is converted back to soft-return when writing out
the text in the Illustrator file.
This filter implement support for a few item properties that give you access to some additional information. These properties are:
UsedFonts |
List of all fonts used at least once
in all extracted items. The list is a string where each font name is
separated by a tabulation. For example: "Verdana-Bold<tab>TrajanPro-Regular<tab>Verdana<tab>FranklinGothic-Book ".
This property is provided at the end of the process (e.g. when ReadItem() returns ENDINPUT ) |
DisplayFile |
Full path of a possible display file
corresponding to a binary item. This property is provided when
ReadItem() returns STARTBINARY . |
To improve performances when processing a batch of several files in different formats, it is recommended to regroup all the files using the Illustrator Filter together. This will avoid re-loading the filter (and therefore Illustrator itself) several times.
Extract items with only white spaces -- Set this option to include in the extracted items all items made of only white spaces. If this option is set the items made of only white space characters are extracted.
Extract items with only numbers (and possibly white spaces) --
Set this option to include in the extracted items all items made of only numbers
and optionally white spaces. If this option is set the items made of only the
characters '0
', '1
', '2
', '3
',
'4
', '5
', '6
', '7
', '8
',
'9
', '-
', '+
', '.
', ',
',
'(
', ')
' (and possibly white space characters) are
extracted. Items made of only white spaces are extracted or not depending on the
Extract items with only white spaces option.
Mark as inline codes the text parts matching this regular expression -- Set this option to use the specified regular expression to be use against the text of the extracted items. Any match will be converted to an inline code. By default the option is not set.
Edit Expression -- Click this button to edit the regular expression and its options.
See the Regular Expressions section for more information about the syntax and rules for building regular matching patterns.
Remap the following input fonts to new output fonts -- Set this option to generate an output file where some of the original fonts are remapped to new ones. List in the Input fonts field all the original fonts you want to remap, and list in the Output fonts field the corresponding new fonts.
Input fonts -- Enter all the original fonts you want to remap.
Use one line per font in each field. The name of the fonts is case-sensitive and
must match the Illustrator font names. You can use '*
' character to
indicate "any font other than the ones listed". The corresponding output font
will be used for any input font not listed. If you have any duplicate in this
list, the first one will be used, the other ignored.
Output fonts -- Enter all the new fonts you want to use. Put each new font in front of its corresponding original font. Use one line per font in each field. The name of the fonts is case-sensitive and must match the Illustrator font names.
Tip: The Text Extraction utility has an option to list all fonts used in a set of files.
Example 1: The extracted text frames set to TrajanPro-Regular
or
Miryam
will be changed to ArialMT
. The extracted text
frames using other fonts will not be changed.
Input fonts | Output fonts |
---|---|
TrajanPro-Regular |
ArialMT |
Miryam |
ArialMT |
Example 2: The extracted text frames set to TrajanPro-Regular
will be changed to use ArialMT
. All the other extracted text frames
will be changed to Verdana
.
Input fonts | Output fonts |
---|---|
TrajanPro-Regular |
ArialMT |
* |
Verdana |