This content has been marked as final. Show 3 replies
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
yeah I now have an idea.
Im hoping u could provide me some pseudo code. the steps u know. If possible
I'll work the real thing out.
Hacking up a document with lingo will probably loose the rtf formatting
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 > 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.