Thursday, July 22, 2010

A little AFP background...

I don't know the full history of AFP but mostly it stems from the IBM 3800 printer days - basically this was one of the first laser printers for industrial use (another being the Xerox 9700). (In those days a "fuser-wrap" paper jam on the 9700 required an 18" crescent wrench to fix - but I digress.)

The most current information available for AFP, and, in particular, color AFP can be found at Output Links. This site contains most of the documentation you will need to understand to deal with AFP - though even "modern" AFP contains elements which I cannot find direct documentation for, e.g., IM Images.

From the perspective of a programmer or technician AFP is very different than PostScript or PDF. First and foremost AFP is record based. All of the commands and images are fit into variable length records up to 32K in length. Second, AFP uses a "wrapper model" to support extensions, i.e., an AFP X'5A' record "wraps" sub elements in their respective sub-records. So, for example, there is a sub language of records to describe images called IOCA. At the top level an AFP X'5A' record may contain multiple IOCA image sub-records.

To make life a little simpler for anyone following this have broken the AFP structure down below:

Image - AFP uses a sub-language called IOCA to describe images. Basically this is like image descriptions in PDF or PostScript - you have various color spaces (CMYK, RGB, LAB, ...), profiles, transparency masks, and the like.

Vector - AFP uses a sub-language called GOCA to describe this. GOCA has strokes, fills, winding, etc. along with full color specification.

Text - Things are a little more interesting here. AFP supports a variety of font types - some modern and some not. On the modern side there is support of Unicode and OpenType. On the not so modern side there are bitmap image fonts. To further complicate things there are multiple notions for placing characters on the page.

Text can be place via traditional line-printer-like commands, via PTOCA (Presentation Text Objects), or via GOCA. Of course, each of these models works differently.

The biggest difference between AFP and something like PDF is that characters cannot be directly and simply "outlined" nor "rotated arbitrarily". While you can "do" all the same things in AFP as you can in PDF - it can be (much) more complex to accomplish.

Another important issue is printer capability. All color AFP devices are designated with "Function Set 45". There are older, less capable printers which can do simply black and white images, and those with even less ability. We won't consider those other than Function Set 45 here.

There are many commercial tools to create AFP from most of the major mainframe-type software vendors. Some vendors support both PDF-type and AFP-type languages.

IPDS - This is a relative of AFP that is used by many high-speed inkjet devices. While the language is different IPDS supports AFP IOCA images so anything discussed here related to IOCA also applies to IPDS.

2 comments:

  1. Todd,

    the Outputlinks pages for the AFP Color Consortium (its old name) are only an intermediate stop for the new web presence of the now named AFP Consortium. The future domain will be afpconsortium.org.

    Regarding IM1: The "IM Image Objects" are the oldest and simpliest form of image objects in the AFP world, long before IOCA came up. So this architecture is described in the AFPDS main specification MO:DCA. For a short description have a look into Appendix C (Migration Functions) -> Coexistence Functions -> Coexistence objects.

    With IM1 it's like BMP: There are many more modern (and more complex) file formats on the market, but the easiest formats will always have a lobby. And they sure are not protected by any patent holders either...

    Guido
    www.afp-lookup.com

    ReplyDelete
  2. Guido - thanks for the clarification. Please feel free to correct me.

    ReplyDelete