Printing and previewing

Graham Samuel livfoss at mac.com
Sat Mar 3 05:33:41 EST 2007


Folks, I'm faced with the problem of providing a printing routine to  
print one or more pages of text (the number of pages is not known in  
advance) on a PC, and also being able to offer an on-screen preview  
facility. Logically, I want the user to press a 'Print' button and  
get a printout, or a 'Preview' button and get a preview of the page 
(s) **exactly as they will appear on the physical printout**; this  
second mode would also allow the user to go on to print. I might  
relax on the "exactly" if I could ensure that the same amount of text  
appeared both on the preview and the printout, and the line breaks  
came in the same places: but it's second best really if the type  
doesn't look the same in both cases.

With the aid of Dan Shafer's e-book on Printing in Revolution  
(thanks, Dan), I think I understand the issue revolving around the  
formatForPrinting property, in that I have to set up my printing  
stack with this property set to true and somehow create the fields  
with the text in - one card per page - without editing them (this  
seems something of a contradiction, but I'm experimenting...):  
however it appears to me that if I show these cards as previews, I  
will get an anomalous result, because the fonts the Rev system uses  
will not be ones intended for screen display, and therefore (we are  
warned) will look 'wrong'. If I do use the ones intended for screen  
display, I run into the danger that they won't look like the  
printout, and might even end up with different numbers of lines per  
page.

Would anyone who has already tackled this be prepared to share their  
approach?

TIA

Graham

PS It's a helluva lot easier on a Mac, where Preview is built in to  
the OS and fonts are WYSIWYG anyway. But my customers have PCs.



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




More information about the use-livecode mailing list