Announcing Merge Text Extension for Adobe Illustrator

Justin | ExtendScript, Illustrator, design, extensions | Sunday, November 23rd, 2008

Following the release of my Combine Textfields extension for Flash, I’ve put together a similar extension for Adobe Illustrator. This extension installs a script that will merge text (including text on a path) into one text object, while retaining the style attributes of the individual pieces, including character styles as well as paragraph styles (if the separator includes a return character).

Anyone who’s tried to edit text from a PDF opened in Illustrator knows how frustrating it can be to make simple text edits when the text is broken up. This extension reduces that headache.

Special thanks to David Van Brink for posting the Omino Dialog Maker. His time-saving code was used to produce the dialog box in this extension.

Download Options

Installation Instructions

JSX or JS file:

  1. Place the MergeText_AI.jsx (or MergeText_AI_CS.js) into the Scripts directory within your Illustrator application directory:

Windows > C:\Program Files\Adobe\Adobe Illustrator {version}\Presets\en_US\Scripts
Mac OS X > Applications/Adobe Illustrator {version}/Presets/Scripts

Note: In CS4, the directory path will include a region directory (e.g. Adobe Illustrator CS4/Presets/en_US/Scripts).

MXP file (CS4 only):

  1. Double-click on the mxp file to install using Adobe Extension Manager.

Usage

In Adobe Illustrator, select the text the you want to merge together and go to File > Scripts > MergeText_AI. If you’re using Illustrator CS3 or CS4, you will be prompted with a dialog box where you can choose your sorting orientation and a custom separator. If you’re using a version earlier than CS3, you will not be prompted with a dialog; the script will run using the default settings sorting topmost, then leftmost, with a separator of “[><]“. You can then run a Find and Replace and replace the separator with the characters of your choice.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Fark
  • StumbleUpon
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Technorati
  • TwitThis
  • MySpace

Related Topics



21 Comments »

  1. Wow!

    This is cool – sounds very useful!

    Niklas

    Comment by Niklas — November 24, 2008 @ 12:19 pm

  2. [...] Text Extension es un script que han desarrollado en Ajar productions, como consecuencia de uno anterior realizado para Flash y que tiene como función unir varias cajas [...]

    Pingback by Desfaziendo Entuertos » Blog Archive » Merge Text - Script para unir cajas de texto en Adobe Illustrator — November 25, 2008 @ 7:50 am

  3. [...] Republished from Ajar Productions. First seen at Mordy’s Real World Illustrator blog. [...]

    Pingback by Kelso’s Corner » Blog Archive » Announcing Merge Text Extension for Adobe Illustrator (Ajar Productions) — November 26, 2008 @ 11:14 am

  4. Thanks. this will save me hours and hours.

    Comment by Andy Jones — December 3, 2008 @ 10:30 am

  5. Glad to hear it, Andy!

    Comment by Justin — December 3, 2008 @ 6:31 pm

  6. [...] the merge text extensions for Flash, Illustrator, and InDesign, Keith Gilbert wrote me wondering about getting swatch information from InDesign to [...]

    Pingback by New Extension: Send Colors from InDesign and Illustrator to Flash | Ajar Productions — December 5, 2008 @ 10:29 pm

  7. Thanks, you make my work so easily

    Comment by Jr. Perez — December 9, 2008 @ 2:13 pm

  8. [...] “Black Wednesday” for publishers and Adobe David’s post about Stripping heh heh MergeText script for Adobe Illustrator CS1–CS4 Selection to PDF script for Adobe InDesign CS3 PDF2ID [...]

    Pingback by InDesignSecrets » Blog Archive » InDesignSecrets Podcast 092 — December 9, 2008 @ 3:01 pm

  9. [...] по наводке камрада Максима. очень приятный срипт для Illustrator для объединения текстовых блоков Combine Textfields. [...]

    Pingback by Illustrator plugin: Combine Textfields » Post » DTP Craft — December 22, 2008 @ 2:48 pm

  10. I have just tried this in CS2, and when the text strings are merged into one line, the tag [><] is inserted between the two entries.

    Comment by kath — January 19, 2009 @ 4:30 am

  11. Kath, this is described in “Usage” above. CS2 doesn’t support the dialog code, so the default separator is used. You can then use find-and-replace to replace the tag with your desired separator.

    Comment by Justin — January 19, 2009 @ 6:59 pm

  12. This is awesome – thanks!
    Have you noted any trouble with spaces? If I bring a PDF into illustrator that has text broken up character by character and merge it, all spaces are removed. Is there a workaround that you’re aware of at all?

    Comment by Matt Rennick — January 23, 2009 @ 2:52 pm

  13. Never mind… stupid question. If the characters are separated individually when the PDF is brought into illustrator – how could the program be expected to know where the spaces are supposed to go?

    Comment by Matt Rennick — January 23, 2009 @ 3:06 pm

  14. Matt,
    One technique that you can use in this case: combine the letters of the first word with no spaces, then the second word, then combine the two words with a space separator, and so on. Or combine the letters of each word, then the whole block of text with a space separator. Still tedious I know, but it beats doing entirely it by hand.

    Comment by Justin — January 23, 2009 @ 5:18 pm

  15. Hello,

    Thanks very much for creating this script. I am using Adobe Illustrator CS3, and I am working with a lot of legacy information which comes with text with individual lines and even individual characters.

    Initially in the download, I noticed it opens up a web page with the program in text; so, I had to copy and paste to a text file (notepad) and rename the extension to .jsx. Then, AI didn’t recognize it initially until I exitted AI and restarted.

    I am able to merge two text strings together with this command.

    Question: since I am relatively new to AI usage.. How do I convert this text object of individual lines into a “text box” so that the text will wrap within the box? When I stretch the box of text, it stretches the letters (and changes the aspect ratio of the text) which I don’t want. I need the text to word wrap within the box and keep the text size the same.

    I am hoping there is a simple answer to this question. I tried the help menus with no luck. Perhaps, there is another script out there. This one is a good start though.

    Thanks,

    JD

    Comment by JD — March 6, 2009 @ 10:47 pm

  16. JD,
    In the future, you should be able to right-click (ctrl-click on Mac) and choose Save Link As… Hopefully, that will save you some trouble when downloading scripts.

    Regarding the stretched letters. You can create a new text area by dragging a rectangle with the text tool and pasting your text in, or, you can just run this new script that I wrote:
    Convert to Text Area.

    Hopefully that will make life a little easier.

    Comment by Justin — March 7, 2009 @ 1:46 am

  17. Justin,

    Thanks again, your script works great.

    All,

    In regards to the merge text script, I was experiencing some issues selecting some text to merge. I would select 2 text entities to merge and it would tell me that no text entities were selected. This seems to happen to some pieces of text and not to others.

    In experimenting with it a bit, I have found that layering structure affects them. If I move some of the text out from lower level layers into higher ones, I can then select and merge them together. I am not exactly sure of the exact dynamics here.

    Does anyone understand the limitation of Merge Text as it relates to layers?

    JD

    Comment by JD — March 9, 2009 @ 7:58 pm

  18. Upon further experimentation, it appears that it doesn’t like it when you select text objects from different layer groups or layer group levels, and it doesn’t like it when you select the only 2 text objects within a layer group. A little rearrangement of the layer structure so that they are all on the same level seems to solve the issue.

    JD

    Comment by JD — March 9, 2009 @ 9:23 pm

  19. JD,
    I ran some tests to be sure. The script doesn’t really care about the stacking order of the text layers, just grouping. If your objects are grouped, it will be recognized as a group, rather than text object(s).
    I did notice that the script runs a little quirky in group isolation mode. The problem occurs when you select all of the items within group isolation mode. Ideally, you’ll want to make sure that your text is ungrouped before you run the script. When I get some time, I may look into this issue and see if it can be fixed.

    Comment by Justin — March 10, 2009 @ 1:01 am

  20. Props to this super handy Adobe Illustrator script which just saved me hours of work: http://is.gd/lSvN

    Comment by danielrhorton (Daniel Horton) — May 21, 2009 @ 7:51 pm

  21. Thanks for this script. It’s handy for sure.

    For Aussies who need to install this script to CS4 Illustrator, download the .jsx file, put in the en_GB folder instead of en_US because the Extension Manager automatically installs into en_US which Aussie version of CS4 doesn’t use but the installation will be successful.

    Took me a little while to figure out what was wrong. There you go.

    Thanks once again.

    Comment by Leanne — May 28, 2009 @ 1:16 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

You may use the following html tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped=""> .

Subscribe without commenting

Powered by WordPress