Ballot Printing and Numbering

Posted by: Jim Dornbos

Ballot Printing and Numbering - 09/30/09 01:28 PM

I could use some help figuring out how to produce a ballot job we're working on.

I have a 100 page PDF with each page representing one voting location.

My data file has field for which location to print and how many copies to print for that location.

I also need to number the ballots from 1 to (number of copies) - and that's where I'm having troubles.

I am doing fine with getting the right PDF page to show using an expression for the PDF page number. I'm printing the right number of copies as well.

After the first record of ballots, the page numbering always prints page 1. I need some help understanding how to work with the page numbering, or possibly not use page numbering but use a new variable, set it to 1, increment it with each printed page, then reset it to 1 when the right number of pages has been printed (so I can start numbering the next location's ballots starting at number 1 again.)

Thanks in advance for any advice you can offer.

Jim
Posted by: Raphael Lalonde Lefebvre

Re: Ballot Printing and Numbering - 09/30/09 01:44 PM

Jim,

How is your document built? Do you have one layout for every pages of your pdf, or you use one layout with one image with variable page number?

I would recommend you use one layout with an image object, and you can use an expression for the page number to display. That expression could simply be "COUNTER()", which would display a different page on every records. You can set your document's default record number to 100 and that will print all 100 pages of your pdf. Then, you can make a text box with a variable, and have it display a variable that uses the expression "COUNTER", which will give you the page's number.

Try it out, let us know if it works.

Regards,
Rapha
Posted by: Jim Dornbos

Re: Ballot Printing and Numbering - 09/30/09 02:40 PM

Thanks, Raphael. It looks like Counter increments with each record in the data file. So when I print 250 copies of record 1, all of them are numbered with 1 (and I need them to number 1-250).
The ballots for record 2 print with the number 2 on all of them, and I need them to print with numbers 1-350.

Almost forgot to mention - the document is setup as 1 layout pulling in variable pages from the pdf as needed.

Thanks for your help.

Jim
Posted by: Jim Dornbos

Re: Ballot Printing and Numbering - 09/30/09 02:48 PM

Hmm - and part of my trouble seems to be that Page_Nr(True) actually resets after each *page*, rather than resetting after each *record*. At least that's how it's working for me with:

PrintShop Mail Windows Edition
Version 6.1.3 (build 3)

PAGE_NR([Reset_after_each_record])
Posted by: Raphael Lalonde Lefebvre

Re: Ballot Printing and Numbering - 09/30/09 03:37 PM

Jim,

It does seem like setting PAGE_NR to True causes it to remain at 1 for the entire job.

Well, I've built an expression that prints page number 1 to 250 for one record, then resets it on the next record:
Code:
PAGE_NR() - (INT((PAGE_NR()-1) / 250) * 250)
Using this code in your page counter variable should properly handle a counter of 1 to 250 on the 250 pages of every records. You can replace the two "250" if you need a different number of copies.

However, as of version 6.1.3, the INT function is broken, and doesn't work properly. It has been fixed in the upcoming release, but in the meantime, you might have to use the fixed version of the command that I've made through a javascript macro, and posted on this thread:
http://www.objectiflune.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=75;t=000038

So in the end, the code will looks like:
Code:
PAGE_NR() - (INT_FIXED((PAGE_NR()-1) / 250) * 250)
Hope that helps.

Regards,
Rapha