Page groups
You can create page groups in these ways:
- You can create page groups that have a fixed number of pages. For example, each page group can be three pages long. You can also exclude a certain number of pages at the beginning of the AFP file from the page groups. For example, if the AFP file contains two pages of introductory information, AFP Indexer can skip the first two pages and create the first page group on the third page.
- You can use triggers to define the page groups. A trigger is a block of text in the AFP file that occurs
in a consistent location on the first page of all page groups and can contain the
same text. As an option, you can also use triggers to indicate the end of page groups.
For example, the block of text that indicates the start of the page group might contain
the text
Page 1
and the block of text that indicates the end of the page group might contain the textPage 3
. If necessary, you can use multiple triggers to uniquely identify a new page group.
For example, a bank-statement application produces a file with hundreds of individual
customer statements. Each statement has the same general format, although statements
might vary in size or number of pages. Each statement contains the page number, an
account number, a date, and the customer's address. With AFP Indexer, you create triggers that define the group boundaries in the file; in this example,
one trigger could be the text Page 1
that occurs on the first page of every statement and another trigger could be the
text Account Summary
that occurs on the last page of every statement.
If you create page groups using triggers or if you create page groups of fixed length, all existing page groups and index tags that are defined in the AFP file itself are ignored.
You can define which pages are used for header and trailer pages. AFP Indexer creates the first page group after the defined number of header pages. It creates the final page group before the defined number of trailer pages.
To create more types of triggers than the control file allows, you can use exits. You can import a trigger exit to override the trigger definitions in the control file if you need more options for creating page group boundaries in the AFP file.