I can’t get page numbers to display correctly.
In my source I have
p class=“pagenumber pagecount”>
Page {#} {##}
/p>
In the Designer preview pane this gets replaced to yield
Page 1 1
Unfortunately the numbers do not change and “Page 1 1” appears on every page.
I get the same if I do a proof print.
I’ve tried putting the code on the master page and the section page.
Any suggestions please?
Perhaps explaining how your template is setup would give others more info to help you better. I say this because sometimes you have to use the page numbering options found in Insert-Special Character-Markers. Also at other times you might want a second section to not follow on with the numbering from Section 1 and therefore disable restart numbering in right click section and select numbering from the context menu.
Wait a second. Are you wanting a page number for each record? Like record 1 to display Page 1 of N, record 2 Page 2 of N? or have you got it sorted now?
Yes a page number for each record, but only because every record produces one page.
I actually only want to get Page n, the other counts were just experimenting trying to get something to work.
Ok, Page N is easy. But Page X of N I’m not sure about unless the new update allows for script access to total records. Just add a javascript field to your mapper and put record.index; as the code. That will add a sequence number to your mapper that you can use in your template. Or use a output preset to add page number to your template. Page ${document.sequence.job}
So, if you have 100 records and each record produces 1 page, to get a N of M page count across the entire job you’ll need to use an Output preset. The page numbering in the main design interface is strictly for use when records create multiple pages.
In your Output Preset, check the Add additional content box.
On the next page, add a new text object (green plus > text).
Here you’ll want to refer to the user guide about output variables.
Since you’re working with a page count across records, or across a document set, you’ll need to refer to the Set variables.
Well, it does say that the page count is the total number of pages in the document. What you need to keep in mind is how a ‘document’ is defined in Connect.
Effectively a Document is the sum total of pages created from a single record. So what you might be considering your ‘document’, Connect is defining as a ‘job’, or the sum total of pages generated by all records in a data set.
The whole thing follows a simple hierarchy:
Job - a collection of Job Segments generated from a single data source.
Job Segment - a collection of Document Sets. This is a user defined group but there’s always at least one
Document Sets - a collection of Documents. Again, this is user defined but there’s always at least one.
For instance, you might have a Job that’s been grouped into multiple Job Segments by State. Each Job Segment is then further sub-divided into Document Sets by City. Finally, each Document Set is comprised of Documents, each of which will have been generated by a single record and will consist of one or more pages of content destined for a single mailing address.
From there an individual document is further broken down into Sections and Pages where each document consists of one or more sections and each section is one or more pages.
Now, it will happen that sometimes we need to set up a datamapping where a record does not equal a ‘document’. For example, say we have a PDF that we want to add a logo on to every page. From our perspective, it makes no sense to set up proper document boundaries. So we set the boundaries in the datamapping to be by page. One page of our PDF equals one record. Then in design we show taht PDF page as the background and overlay the logo.
In reality, that PDF may represent one or more documents for us, but we’ve just told Connect to consider every page of the source PDF as its own Document. When we’re working with Connect in this way, it’s up to us to keep track of what is actually a document or not because we haven’t given the software enough information to conform to our definition of document boundaries.
The documentation also assumes that your Job is set up to match this hierarchy, so when it refers to a Document, it’s not an arbitrary choice of language: it means the output generated by each record.