Page Numbers With Printed Text

Jan Bleeker jan.bleeker at xs4all.nl
Mon May 27 13:36:00 EDT 2002


Op 27-05-2002 om 11:08 -0400 meldde 
use-revolution-request at lists.runrev.com ons het volgende:
  use-revolution digest, Vol 1 #427 - 15 msgs

>
>Message: 14
>Date: Mon, 27 May 2002 08:46:18 -0700
>To: use-revolution at lists.runrev.com
>From: Rob Cozens <rcozens at pon.net>
>Subject: Page Numbers With Printed Text
>Reply-To: use-revolution at lists.runrev.com
>
>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.
>--
>
>Rob Cozens
>CCW, Serendipity Software Company
>http://www.oenolog.com/who.htm
>
>"And I, which was two fooles, do so grow three;
>Who are a little wise, the best fooles bee."
>
>from "The Triple Foole" by John Donne (1572-1631)

I solved a comparable problem this weekend.

In short:
Clone the field you want to print
Determine how many lines to print
Delete the lines you printed already
Delete the lines you don't want to print yet
Add your page numbers to the (bottom of) clone-field
revPrintField

In Transcript:

on mouseUp
     put 1 into RegelBegin -- starting linenumber
     put 1 into RegelEinde -- ending linenumber
     put the number of lines of field "Lijst" into AantalRegels 
--number of lines
   
     repeat until RegelEinde > AantalRegels
       repeat until (the formattedHeight of line RegelBegin to 
RegelEinde of field "Lijst" > 800) -- with about 800 pixels my A4 is 
full
         add 1 to RegelEinde
         if RegelEinde > AantalRegels then exit repeat
       end repeat
       clone field "Lijst" -- list
       set the name of it to "Pagina" -- page
       delete line 1 to RegelBegin-1 of field "Pagina"
       delete line RegelEinde+1 to -1 of field "Pagina"

       -- add your headers or footers to field "Pagina"

       set the printmargins to 20,20,20,20
       revShowPrintDialog true,true -- or something else
       revPrintField the name of field "Pagina"
       delete field "Pagina"
       put RegelEinde into RegelBegin
       add 1 to RegelEinde
     end repeat
end mouseUp

You might want to add a lock screen

-- 
Groetjes,
Jan Bleeker



More information about the use-livecode mailing list