Advanced Function Printing (AFP) is a document format and presentation architecture originally developed by IBM to drive its printers and support the production of variable data printing on laser printers, and later provides for document and information presentation independent of specific applications and devices.
The first software program to produce this format and to drive the IBM printers was the so called Print Service Facility (PSF), which is still until today found in IBM's Mainframes. PSF is fed with the input data to be printed and the definitions on how to organize the data on the page, i.e. PAGEDEF (Page Definition) and FORMDEF (Form Definition). It allows electronic forms to be printed on named OVERLAYS.
PSF is not only able to format the documents, but also to drive the AFP printers, or the Intelligent Printer Data Stream (IPDS) compatible printers to be more precise. IPDS is a host-to-printer data stream used for AFP subsystems that provides an attachment-independent interface for controlling and managing.
IPDS format is a bidirectional format where the software is constantly in control of the printer and knows at all times the status of the pages that were sent to the printer, making it an ideal format for high volume production printers, that print hundreds of pages within a minute.
IBM also offered the PSF software to drive the IPDS printers using the AFP format not only on the mainframe, but also on all of the their platforms, so there were PSF/390 (for the OS/390 mainframe), PSF/6000 (for the RS/6000 AIX9), PSF/400 (for the AS/400) and PSF/2 running under OS/2. Unfortunately all of these behaved slightly different and IBM renamed PSF then into IBM InfoPrint Manager.
In 1984 when storage space was still an expensive commodity, the AFP format was designed to be very small, which is why still today it is a very popular format for data exchange that seconds to Adobe Portable Document Format (PDF) and to manage high volumes of documents, such as banks, telecoms and insurances. The format originates from the MVS environment so it typically uses the EBCDIC based codepages. As with all page description languages (like PostScript, PDF, and PCL) it is necessary to use a viewer, usually it's the widely-used viewer, IBM AFP Workbench Viewer, in order to display the pages.
One of the more notable features of AFP printers is that output data can be placed at any addressable point on a page. This capability is called all points addressability (APA). APA gives AFP prints the freedom to create output anywhere on a page, as opposed to being limited to just line and character positions.