More Printing Questions

thierry douez at
Tue Mar 15 16:07:21 EST 2005


i've just finished to make the printing of a field working on Windows...
quite a lot of struggles too :-(

Anyway, you could find below the script. What is interesting is the lasts
parameters of the revPrintText ( found in the Doc ). In the second line, i've
put in comments what was really coorupting my stack... they talk about it in the print
doc too, but i didn't understand very well, but without it works.

the  fields  "TemplateBody" and "TemplateHF" are used respectively to manage the
style  of  the field to print and the Header and Footer.
The textstyle can then be changed with the Property inspector.

I have no idea if this is the best way to print the content of a field :-)

the  tests was made with Rev2.1 and the trial version of Rev2.5.1
on a Win98 and W2k.

Otherwise,  during  development  time, i needed to restart Revolution whenever my
code was not printing properly !!!

Hope this help,
Regards, thierry

  case "Print report"
    -- NEVER ! set the formatForPrinting of this stack to true
    set the printMargins to 25,20,10,10
    revShowPrintDialog true, true
    revPrintText the Text of field "BioArchimedScript" of cd "Script" , \
        "<%the long date%>" &tab&tab& the cProject of this stack &cr, \
        "BioArchimed Version 2.1" &tab&tab& "<%PageNumber%>/<%NumPages%>", \
        the long name of field "TemplateBody" of cd "Script", \
        the long name of field "TemplateHF" of cd "Script", \
        the long name of field "TemplateHF" of cd "Script"

K> Thanks very much for this - I see what you mean about the difference between
K> the text and the field.  However, my printing still seems to have a life of
K> its own - the printout still resolutely refuses to use Courier font when
K> using revPrintText (on the Mac or PC).

K> Under Windows the old problem still manifests itself of all text (menus,
K> labels and button text) vanishing when printing is attempted.  It does still
K> print stuff out though!  Luckily, quitting and then restarting fixes it.  I
K> think that running this within the IDE is what corrupted the stack
K> previously.  Is Windows printing trickier in Revolution?  I seem to have got
K> on reasonably well with it on the Mac but there seem to be a lot of pitfalls
K> on Windows.

K> Thanks, Karen

>>> set the textFont of field "PrintLayout" to "Courier New"
>>> set the textSize of field "PrintLayout" to 10
>> with:
>> set the textFont of char 1 to -1 of field "PrintLayout" to "Courier New"
>> set the textSize of char 1 to -1 of field "PrintLayout" to 10

K> _______________________________________________
K> use-revolution mailing list
K> use-revolution at

Best regards, 

More information about the Use-livecode mailing list