How to display page numbers
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to display page numbers
Wonder if somebody can help.
I have built a quote generating application in RunRev and am stuck on the best way to number pages.
The 'quote' consists of 22 cards in 1 stack. On card 1 I have tick boxes that relate to each card - so if all boxes are ticked then all pages are set to print. If you deselect boxes then those pages will not print.
At the bottom of each page i'd like the pages numbered in the following format: 'page 1 of 22' which is straight forward, however if users do not require some of the pages to be printed therefore de-selecting boxes of page 2 and 3 for example then how can that reflect in the page numbering?
Your help is most appreciated.
Daniel
I have built a quote generating application in RunRev and am stuck on the best way to number pages.
The 'quote' consists of 22 cards in 1 stack. On card 1 I have tick boxes that relate to each card - so if all boxes are ticked then all pages are set to print. If you deselect boxes then those pages will not print.
At the bottom of each page i'd like the pages numbered in the following format: 'page 1 of 22' which is straight forward, however if users do not require some of the pages to be printed therefore de-selecting boxes of page 2 and 3 for example then how can that reflect in the page numbering?
Your help is most appreciated.
Daniel
Last edited by bsouthuk on Tue Mar 16, 2010 7:25 pm, edited 1 time in total.
Re: How to number printed pages
Not exactly sure how you have this set up. But you could always simply loop through your checkBox buttons and load only those whose hilite is true into a list.
it would help greatly if your buttons were sequentially numbered, or if they were grouped or if they had a common factor like "printBtn1,printBtn2...etc. This would make your loop more manageable.
So for example, if the buttons were numbered from 1 to 22, say:
on mouseUp
unmark all cds
repeat with y = 1 to 22
if the hilite of btn y then mark cd y
end repeat
print marked cds
end mouseUp
Or something like it. There are a million ways, most depending on how your stack is set up.
Craig Newman
it would help greatly if your buttons were sequentially numbered, or if they were grouped or if they had a common factor like "printBtn1,printBtn2...etc. This would make your loop more manageable.
So for example, if the buttons were numbered from 1 to 22, say:
on mouseUp
unmark all cds
repeat with y = 1 to 22
if the hilite of btn y then mark cd y
end repeat
print marked cds
end mouseUp
Or something like it. There are a million ways, most depending on how your stack is set up.
Craig Newman
Re: How to display page numbers
That works perfectly when it comes to printing the correct cards so thanks very much for that. However how can I actually display the page number at the bottom of each page that is printed. ie 'page 1 of 22', 'page 2 of 22' etc
Is this possible?
Is this possible?
Re: How to display page numbers
Hi Daniel,
sure this is possible!
Try this:
Best
Klaus
end mouseUp
sure this is possible!
Try this:
Code: Select all
on mouseUp
unmark all cds
## Collect the number of all cards to be printed
put 0 into totalcards
repeat with y = 1 to 22
if the hilite of btn y then
mark cd y
add 1 to totalcards
end if
end repeat
## Now a second repeat loop to display your printing info and actually print the cards
put 0 into current_print_card
repeat with x = 1 to 22
## This card has been marked in the last repeat loop
if the mark of cd x then
add 1 to current_print_card
put current_print_card && "of" && totalcards into fld "printinfoo" of cd x
print cd x
end if
end repeat
end mouseup
Klaus
end mouseUp
Re: How to display page numbers
One slight issue I'm having with the following script
For some reason it is not printing the first page. Also I want the page numbering to start from page 3 - is there a way of doing this?
Code: Select all
on mouseUp
unmark all cds
## Collect the number of all cards to be printed
put 0 into totalcards
repeat with y = 1 to 22
if the hilite of btn y then
mark cd y
add 1 to totalcards
end if
end repeat
## Now a second repeat loop to display your printing info and actually print the cards
put 0 into current_print_card
repeat with x = 1 to 22
## This card has been marked in the last repeat loop
if the mark of cd x then
add 1 to current_print_card
put current_print_card && "of" && totalcards into fld "PageNumber" of cd x
end if
end repeat
print marked cds
end mouseup
Re: How to display page numbers
Oh, really? Hmm, don't see any obvious reason for this...bsouthuk wrote:For some reason it is not printing the first page.
What exactly do you mean? NO page numbering on cards 1 and 2 but after that on all cards?bsouthuk wrote:Also I want the page numbering to start from page 3 - is there a way of doing this?
Sorry, don't know what you mean exactly.
Best
Klaus
Re: How to display page numbers
It's OK Klaus - I have sorted this, trial and error worked for this one!
Thanks very much for your help.
Thanks very much for your help.