Page numbers
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Page numbers
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.
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.
while removing from the skilled the ability to access wealth.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Use the 'revPrintText' command: it allows you to pass header and footer text which can include special expressions - from the documentation:
Hope this helped,
Jan Schenkel.
So basically you'd have something like: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.
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
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com