🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17605

Text Formatting, Revisited

#17605
From: John Darnell
Date: Sat, 24 May 2003 22:19
21 lines
2180 bytes
Hello fellow scriptes:

I wrote about a month ago to request information on how to format script on the fly. Thanks to you I developed a very clever scheme (If I may say so myself -- grin) for actually getting the four formatting styles into the text we add through scripting (i.e. the text is not already present; we are reading it in through a file; the formatting codes are embedded in the text--see following).

To describe it for, say, the BOLD format, what I did was encase the text to be bolded in special code. For example, the text comes to us looking like this:

[BF]Bold This[EBF]

I change it before I put it in the text frame to this:

(~B)Bold This[~B]

When all text frames intended for the page were created and the text loaded, I did a search for the above two strings (i.e. (~B) and [~B]) then used the resultant lists to obtain coordinates for the ranges to be bolded, and then obtained a reference object to the specified text, and set the BOLD attribute to true. I then went back through the text and removed all the special codes. Piece of cake.

The problem is that this method is proving too slow. When this procedure is in place, we may be processing up to 100,000 pages a year, and that means about 400 pages a day, or 3.6 minutes per page. Its taking between four and five minutes with my present arrangement. If we can't speed it up, there's talk of ditching the whole project and writing it in C++ (yuk).

Does anyone know of a faster way to do this?

TIA.

John
Technical Details
Message-ID: <1de9428b.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,b8f626ee7f33ff48,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-24 15:38:07 PST
From: "John Darnell" <John.Darnell@Walsworth.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Text Formatting, Revisited
Message-ID: <1de9428b.-1@WebX.la2eafNXanI>
Date: Sat, 24 May 2003 15:19:15 -0700
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit