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

0 # Reynaldo 2020-09-20 19:06
Nice blog! Is your theme custom made or did you download it from
somewhere? A design like yours with a few simple tweeks would really
make my blog jump out. Please let me know where you got your theme.
Many thanks

my webpage: Daftar Joker123: http://www.daftarlinkslot.com/joker123/tokaibet-joker123-gaming-slot-online-dan-joker388-terbaru/
0 # Debra 2020-09-19 18:02
bookmarked!!, I love your web site!

Here is my web site Joker123 Gaming: http://www.nexiasjoker.net/situs-nexiasbet-joker123-slot-judi-online-terpercaya/
0 # Arletha 2020-09-16 21:43
Woah! I'm reallу loving tһe template/theme οf this blog.
It's simple, yet effective. A lot of tіmes it'ѕ
challenging to ցet tһat "perfect balance" betwеen user friendliness and appearance.
I muѕt ѕay you have ԁone a amazing job with this.
Also, the blog loads super faѕt for me on Chrome.

Superb Blog!

Ԝould Y᧐u Heгe іs my web-site; agen togel; Kris: https://megatop4d.com/,
0 # Marlene 2020-09-16 03:59
I was pretty pleased to find this web site. I need to to thank you for your time just for this wondcerful read!!
I definitely realpy liked every bit of it and I have youu saved as a favoriite to look at new information in your blog.

Would You My web blog; agen slot online terbaik:
0 # Lynne 2020-09-16 03:16
hi!,I love your writing very a lot! percentage we keep in touch more
about your post on AOL? I require a specialist in this space to unravel my problem.

Maybe that is you! Having a look forward to see you.

my web blog Joker Gaming: http://www.jokervip.co/panduan/joker123/cara-memenangkan-bermainan-game-joker123-tembak-ikan-online/
+1 # Gretchen 2019-11-19 07:50
Thank you – this is brilliant! A huge time saver!
+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.

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.