Avoiding line cut-off in a multipage printout

Graham Samuel livfoss at mac.com
Sun Mar 26 08:36:55 EST 2006


I have a print routine adapted from something Hugh Senior put in The  
Scripter's Scrapbook (thanks Hugh). I may well have done something  
stupid to it, but I am making heavy weather of making sure that if  
I'm printing more than a single page of text, the last line on any  
given page is not cut off so that only part of the line shows.

The issue is that AFAIK, RunRev thinks only in terms of pixels and  
not in terms of lines of type. In these circumstances the only way I  
can think of to avoid the cutoff is to add up all the formatted  
heights of the successive lines until I find I've overflowed my page  
area, then backtrack one whole line and print that (I'm thinking of a  
generalised routine which will handle lines in different fonts and of  
different heights, so I can't simply look at the height of the first  
line and work from there).

This works but it seem incredibly clunky. I assume that this problem  
has been solved many times, and that maybe there is even a way of  
telling RR that you want to print in whole lines but I've somehow  
missed it.

I'd be grateful for any advice.

Graham
----------------------------------------
Graham Samuel / The Living Fossil Co. / UK and France




More information about the Use-livecode mailing list