Using %%TOTAL_PAGES to Assign Output
The %%TOTAL_PAGES system variable’s value is the total number of logical front pages in a document. You can use %%TOTAL_PAGES in a rule to control which output Enrichment writes a document to based on page count. For example, to send all one-page documents to one output, multi-page documents of 10 pages or less to a second output, and multi-page documents of greater than 10 pages to a third output, you might specify rules as shown below.
IF %%TOTAL_PAGES = 1 THEN
<OUTPUT> ONEPAGE
ELSEIF %%TOTAL_PAGES > 10 THEN
<OUTPUT> LARGEOUT
ELSE
<OUTPUT> MIDOUT
ENDIF