Page Numbers With Printed Text

Jan Decroos jan.decroos at groepvanroey.be
Tue May 28 02:53:40 EDT 2002


use-revolution at lists.runrev.com writes:
>Hi All,
>
>Can anyone tell me how to get page numbers in the header or footer 
>when using revPrintField?  Since the command itself sets the page 
>breaks, I can't see how I can maintain a page count variable.
>-- 
>
In stead of revPrintField (which calls revPrintText, but with empty header and
footer fields) call revPrintText :

Transcript Dictionary:
see revPrintText :
"If the textToPrint, headerText, or footerText contains any expressions of the
form <%expression%>, the expression is evaluated and replaced with the value
before the text is printed."

In the script (revLibrary, button revPrintBack) there are 2 variables :
pagenumber (current page number) and numPages (total number of pages).  So if
you put "<%pagenumber%> / <%numPages%>" in one of the 3 footer fields,
pagenumbers will be printed :
1 / 5,  2 / 5, 3 / 5, ...

Jan




More information about the use-livecode mailing list