When you open in Illustrator a PDF file generated from InDesign or QuarkXPress, you certainly noticed that the paragraphs are always split into several text frames, at least one for each text line but often you even see multiple contiguous text frames on the same line. If you do not have available the source file and you want to be able to edit the text from the PDF using Illustator, it is more convenient to have one single text frame with several lines, where you can then insert or delete words or whole lines, modify the leading, alignment, kerning, tracking, etc.

As i promised you in my first article "Fit a text to an outline", here is a script that will enable you to merge text parts together to get multi-line text frames.

This script could still be improved but it would be a pity to keep on indefinitely waiting for it to be perfect before publishing it, when it is already very useful to me since long in its current state. I first named it "recreate paragraph" but this script for the time being doesn't build multi-line paragraphs with uniform leading and lines separated by ¬, it rather builds multi-line text frames with lines separated by ¶ (that is, single-line paragraphs). Considering my intensive use of this script, i didn't build dialogs to edit the variables such as the "add-baseline-shift threshold" or the "same-line threshold", which could sometimes be useful but would most of the time slow down the usage[1].

Rather than having to answer each time to a dialog box, i made two versions of this script:

  1. "merge-into-one-line_ai.jsx" attempts to merge all selected text frames into one single line, adding some "baseline shift" to the non-aligned texts parts in order to keep the aspect, and is suitable for example when you want to merge on a same line several text frames including some offset split parts resulting from superscript or subscript.
  2. "merge-into-one-text_ai.jsx" merges on a same line only actually vertically aligned text frames (with a 1pt tolerance), then merges the lines into one single multi-line text frame, seeks the alignment mode that best preserves the initial horizontal distribution (left, center or right) and the leading preserving the vertical distribution[2].

reconstituer paragraphe ai 002

Note: this script only copes properly with straight horizontal text frames, it is not intended for the type on a path or area type, nor for the transformed text, especially rotated.

This functionality is now integrated into the «Text Rebuild Tools» extension for Illustrator CC+

[1] Illustrator unfortunately doesn't allow to create ScriptUI palettes but only dialog boxes that you have to answer to each time by "OK" or "Cancel", so I later created a HTML5 panel.

[2] See an improved version in «Text Rebuild Tools» dealing with actual multiline paragraphs and offerrring to rather play with other parameters such as left/right indent, space before/after, 1st line left indent, etc.

Add comment

Comments   
Felica
0 # Felica 2021-01-26 16:35
Art is actually an easy method to bring personality as well as a little bit of private flair to
the inner parts of your house. Perhaps these seven concepts will certainly provide you a place to begin if you have actually located it difficult to include it
to your residence.

Also visit my web-site - Visit Webpage: http://mayonnaised.com/index.php?title=The_Most_Ideal_And_Also_Cheapest_Furniture_For_Our_Household
Reply
Carrol
0 # Carrol 2021-01-26 07:00
It's remarkable designed for me to have a site, which is
beneficial in favor of my knowledge. thanks admin

Also visit my blog post: Find Out
More: https://mootools.net/forge/profile/jamaryconway
Reply
Janessa
0 # Janessa 2021-01-26 06:44
Do you have a spam issue on this website; I also am a blogger,
and I was wanting to know your situation; many of us have developed
some nice methods and we are looking to exchange techniques with other folks, be sure to shoot me an e-mail if interested.



Here is my web blog ... Get More Info: http://www.mappery.com/user.php?name=barrettucohen
Reply
Thurman
0 # Thurman 2021-01-20 01:57
Thanks a lot for sharing this with all people you really recognize what
you are speaking approximately! Bookmarked. Kindly also
consult with my website =). We will have
a hyperlink trade contract between us

Feel free to visit my web site; Going Here: https://www.askmefast.com/categorydetail.php?cmd=ulist&userid=21146566
Reply
Gretchen
+1 # Gretchen 2019-11-19 07:50
Thank you – this is brilliant! A huge time saver!
Reply
Grace
+1 # Grace 2019-08-22 22:51
THANK YOU for this! You don't even know how much time these scripts have saved me in rebuilding a brochure in ai from an ancient pdf. You're a saint.
Reply

Follow Scriptopedia to Social Network

Scriptopedia sur facebook

About Scriptopedia.org

An original idea from Loic Aigon, designed by Eddy.VH. It 's a scripts library for Desktop Publishing Adobe products. Find Javascript for Photoshop, Illustrator, inDesign and Acrobat or ATN scripts ( Photoshop actions ) you need.