Page 1 of 1

Page numbers

Posted: Thu Sep 04, 2008 10:14 am
by dalkin
Is there a known way of forcing page numbering when printing from a scrolling text field? Being a wordy sort of bloke, I've got about 8 pages I'd like people to print but without page numbers, it gets a bit messy. I'd do it as a pdf but I want user edits as well.

Posted: Thu Sep 04, 2008 12:32 pm
by Janschenkel
Use the 'revPrintText' command: it allows you to pass header and footer text which can include special expressions - from the documentation:
You can also use the special values <%pageNumber%> and <%numPages%> in the textToPrint, headerText, or footerText. These expressions are replaced with the current page number or total number of pages respectively.
So basically you'd have something like:

Code: Select all

on mouseUp
  put the htmlText of field "Scrolling Field" into tBodyHtmlText
  put "Page: <%pageNumber%> of <%numPages%>" into tFooterText
  revPrintText tBodyHtmlText, empty, tFooterText
end mouseUp
Hope this helped,

Jan Schenkel.

Posted: Thu Sep 04, 2008 10:40 pm
by dalkin
Cheers for that, Jan. The kids can make their own damn breakfast this morning - I'm going to try it now!