Standardized AFP requirements
Document delineation
Begin Named Group (BNG) and End Named Group (ENG) structured fields surround each document in the AFP file.
Each page contained by the group delimiters is included; therefore, banners or separator pages that are not to be enclosed in an envelope should not be included in the group. Pages outside the groups at the beginning and end of the file or between groups through the file are discarded before printing, because each document becomes a unique entity that is no longer required to remain with the other documents in the print file.
This standard applies to each document, whether or not the document is ever physically printed or mailed.
Document indexing
Each document includes at least one Tagged Logical Element (TLE) structured field that lets an operator identify the document. You can specify additional document properties that contain values from the index tags in the data.
Documents that are to be sorted or grouped need TLEs to define the grouping and sorting criteria. Some criteria can be defined in job properties instead of in individual document TLEs.
This is a sample of standard AFP structure:
BDT (Begin Document) BPG (Begin Page – Header page (s) EPG (End Page) BNG (Begin Named Group – Document) IMM TLE (Tagged Logical Element) – CustomerAcctNo TLE (Tagged Logical Element) – CustomerAddr<1-6> TLE (Tagged Logical Element) – MailRecipient TLE (Tagged Logical Element) – CustomerZIP TLE (Tagged Logical Element) - CustomerInsertBins BPG (Begin Page) Page data EPG (End Page) BPG (Begin Page) Page data EPG (End Page) ENG (End Named Group) EDT (End Document)
Document manipulation
The AFP file must adhere to the formatting rules listed here to allow the addition of text, barcodes, or cover blocks. Those additions can be made with the Enhance AFP control file that is specified on the CreateAFPJobsFromDocuments and BuildAFPFromDocuments step templates. These rules are in addition to the document indexing rules and define a consistent set of documents throughout the file.
Requirements and Examples | |
---|---|
Valid AFP | The AFP data must conform to the Data Stream and Object Architecture: MO:DCA Reference. |
BDT/EDT(s) | The AFP data can contain more than one pair of Begin Document (BDT) and End Document
(EDT) structured fields, but they cannot be nested.
Example: BDT ... EDT BDT ... EDT |
Named Groups - BNG/ENG(s) | Named page groups for document boundaries must be present. If there are nested page
groups, only the outer level is used to define document boundaries.
Example: 2 mailpieces BNG (1st mailpiece) BNG/../ENG (nesting allowed) BNG/../ENG\ ENG BNG (2nd mailpiece) ENG |
Pages - BPG/EPG(s) | Pages outside of named groups are ignored. These pages are not indexed or printed.
Example: 2 banner pages BDT BPG/EPG (discarded) BPG/EPG (discarded) BNG BPG/EPG (1st document) ENG EDT |
Index Tags - TLE(s) | Index tags cannot occur outside of existing named page group boundaries. One instance
of each required index tag is found in the bounds of the named group. These index
tags can be in nested named groups or pages.
There is only one value for each required index tag, regardless of how many TLEs of the same name have been provided. Therefore, multiples of the same index tag, such as CustomerName in a group, are not supported. Example: valid TLEs BDT BNG TLE 1 BPG TLE 2 EPG TLE 3 ENG |
Invoke Medium Maps - IMM(s) | An Invoke Medium Map structured field must be included after the BNG structured field
that marks the beginning of each document, and before the first BPG structured field
that marks the beginning of the first page of the document.
Example: BDT BNG/IMM/../ENG BNG/IMM/../ENG BNG/IMM/../ENG ... EDT |
Units | Measurement units in any Presentation Text Descriptor (PTD) structured field in the document must match the units set in the Page Descriptor (PGD) structured field. |
Enhanced N-Up | The form definition used for the AFP data can use the enhanced N-up function but it cannot specify pagination between the partitions. |
Constant Pages | If the constant pages function of the form definition is used, it must specify only constant pages that fit a consistent pattern, such as all backs, all fronts, first back of each document, and so on. |
Mixed Plex | The form definition used for the AFP data must not change back and forth between simplex and duplex. |
Form definition functions | The form definition must not contain these structured fields: Presentation Finishing Control (PFC), Map Suppression (MSU), and Medium Finishing Control (MFC). |