Tuesday, December 6, 2011

Best way to handle large amount of text

hello everyone



My project involves handling large amount of text.(from
conferences and

reports)

Most of them r in Ms Word. I can turn them into RTF format.

I dont want to use scrolling. I prefer turning pages(next,
previous, last,

contents). which means I need to break them into chunks.

Currently the process is awkward and slow.



I know there wud b lots of people working on similar
projects.

Could anyone tell me an easy way to handle text. Bring them
into cast and

break them.



any ideas would be appreciated

thanx

ahmed





Best way to handle large amount of text
Do you have any formatting to maintain, or is it plain text?



Ideally you would want a system that stores the entire text
for a particular document in one place and then breaks it up piece
by piece in Lingo. If you have only plain text this is quite easy,
if you need formatting I'd recommend something like basic HTML or
RTF markup which you can store in text files or field members and
display in you on stage member page-by-page.



You could write a script that calculates how much text can
fit on a page, or you could manually paginate the text so it breaks
where you want it to by using a particular character or character
sequence that you search for to use a page breaks at runtime



hth



johnAqBest way to handle large amount of text
hi johnAq



yeah I now have an idea.

Im hoping u could provide me some pseudo code. the steps u
know. If possible

please.

I'll work the real thing out.



thanx

ahmed






Hacking up a document with lingo will probably loose the rtf
formatting

information.





Here's a bit of code to find the physical position of a given
line of on

screen text (counting returns is not accurate with word
wrapped lines)



This stragety uses charPosToLoc to get actual position for
the text

member's current width and font size





maxHeight = 780 -- arbitrary display height limit

T = member(''sourceText'').text

repeat with i = 1 to T.line.count

endChar = T.line[1..i].char.count

lineEndlocV = charPosToLoc(member ''sourceText'',
endChar).locV

if lineEndlocV %26gt; maxHeight then -- fount ''1 too many''
line



-- extract identified lines ''sourceText''

-- perhaps repeat parce with remaining part of ''sourceText''



singlePage = T.line[1..i - 1]

member(''sourceText'').text = T.line[i..99999] -- put remaining
text back

into source text member











If you want to use one of the roundabout ways to display pdf
in

director. There might be some batch pdf production tools that
can create

your pages in pretty scalable pdf format.



I think flashpaper documents can be adapted to director.

No comments:

Post a Comment