IBM Support

Creating AFP Resources Using the IBM AFP Printer Drivers



This document describes how to install and configure the IBM AFP drivers to create overlays and page segments using a Microsoft Windows PC.

Resolving The Problem

IBM AFP resources such as overlays, medium overlays, or page segments can be created on the system using the IBM AFP printer drivers. Recent versions of the driver may be called the Infoprint AFP printer driver.

Installing the IBM AFP Printer Driver
1. Open up your Printers folder from the Microsoft Windows Control Panel and double-click on Add Printer.
2. When the Add Printer Wizard pops up, click Next.
3. On the Local or Network Printer dialog box, choose Local Printer and uncheck the option to automatically detect.
4. On the Select the Printer Port dialog box, choose FILE: (Print to File).
5. On the next screen you will be prompted to select the Manufacturer and Printer driver name. Choose IBM and scroll down the right side of the dialog box and look for the AFP printer drivers. If you see them, choose the one that matches the output you wish to create. Generic IBM 300dpi AFP is a good choice for a laser printer, and Generic IBM 144dpi AFP should be used for dot matrix printers, such as the Infoprint 6500. Click Next, and proceed to Step 6.

If you do not see any AFP drivers, your IBM iSeries Access was installed without the SCS and AFP drivers. You can cancel out and choose to install the drivers using the Selective Setup utility or downloaded from the following Rochester Support Center knowledgebase document. There is not a Selective Setup option using System i Access R610. In order to add or remove components on 610, you must go to the control panel of the PC, select Add/Remove Programs, Select IBM System i Access for Windows, and then Change.

For more information, please refer to the following documents:

 AFP Printer Driver Update
 AFP Printer Driver for Windows 7 and Windows 8.1
6. On the Name Your Printer dialog box, confirm the driver name. You will be asked if you want this driver to be the Windows default printer. Choose No.
7. On the Printer Sharing dialog box, select Do not share this printer.
8. On the Print Test Page dialog box, select No.
9. Confirm your selections on the Completing the Add Printer Wizard dialog box and click Finish.
10. Your IBM AFP driver is now installed.

Configuring the IBM AFP Printer Driver

Before using the driver it helps to configure it to match your desired output. For example, if you wish to create an overlay you should configure the driver to output data as an overlay; if creating a page segment, you should configure the driver to output data as a page segment. To do this, right-click on the driver under your Printers folder and click Properties. At the bottom of that dialog box there should be a button marked Printing Preferences. Click on the Output Type field and select your desired output.

AFP driver printing preferences

If you need help deciding which type of output is required, click on the Question Mark in the upper right corner of the dialog box and then click on the Output Type field. The appropriate help screen will be shown.

Printing from a Windows Application

Now that your IBM AFP driver has been installed, you can create your overlay or page segment by printing to it. This can be done from any Windows application with print capability; however, there are some suggestions you should keep in mind.
1. If you are creating a custom electronic form like a purchase order or invoice that is tailored for your business, you will want to use an application which lets you draw lines and boxes and include text. Typically, full page editing applications like word processors are best at this.
2. If you are creating an electronic form that is an industry standard form, like a government tax form, look for an electronic version of the form to use to create your overlay. Many government forms are available in PDF format online, and the overlay will be of much higher quality if printed through Adobe Acrobat Reader to the IBM AFP driver than if you scan in the form and print it as an image from an imaging application.
3. If you are designing a logo, keep the following in mind. For the most part, the IBM AFP drivers are programmed to output a black and white image. To ensure your resulting AFP source image prints as good as possible, try printing to the IBM AFP driver from both a gray scale or color image and an image which has been converted to a Black and White (1-Bit) palette. The output that is sent to the IBM AFP driver is dependant on your imaging application, so you may want to try printing from different applications to see how it looks.

For more information on using the AFP printer driver to create color overlays, please refer to the following document:

 Generating Color Overlays and Page Segments Through the IBM AFP Print Driver
4. Picture editing applications often do not have the layout options necessary to format a printout. This will cause your overlays and page segments to position incorrectly or be clipped. Try to use another application if possible.
5. When requesting images from co-workers or your company's art or design department, request high quality images in TIFF, GIF, or BMP format if possible. JPEG images, while typically the most commonly used, are lossy image formats, meaning that they do not store an image precisely, but rather try to save space by grouping similarly colored areas of the image. This makes the file smaller, but of low quality when printed. TIFF, GIF, BMP (and some other) image formats are lossless, meaning that each pixel of the image will actually be printed as shown. These image types create much better print output.

Note: The resulting AFP image will be the same size no matter what image type you start with. The size of the resulting AFP file depends on the quality and resolution of the input image.
6. If you wish to create as high quality an image as possible, make your input image match the resolution of your AFP driver. If you will be using the Generic IBM 300dpi AFP driver, your image should be 300 DPI. If using the Generic IBM 600dpi AFP driver to print to an IPDS printer (typically used for signatures for ultra high quality) try to get a 600 DPI input image.
7. If printing using Host Print Transform, use the Generic IBM 300dpi AFP driver. Host Print Transform dithers all AFP resources up to 300 DPI from regardless of the source resolution, so using the 300dpi driver avoids burning CPU cycles at print time.
8. If printing from Adobe Reader, there is an "Advanced" button on the print dialog. Click that button, and then check the "Print as Image" box. If the resulting data is truncated halfway across the page, try going to the Clip Limits of the AFP driver, select 'Unprintable Area", and set the left and right unprintable area to 0.25 inches.

When you are ready to print from your Windows application, click File > Print and select your IBM AFP driver. Click on the Properties button to view the current driver settings:
1. Ensure that your Output type matches your desired output. If you leave it at Document it will not work.
2. If you are creating an overlay that will printing on 8.5 x 11 paper, you can probably safely take all the defaults. To better control your margins, you can click on Clip Limits and change the default 0.25 top and left margin to 0.00. This will allow your image to print as far to the left and top as possible, and will allow you to define your image margins from your application rather than relying on the driver.
3. If you are creating a page segment, ensure that you select the Output Type of page segment and then click Clip Limits to bring up those options as well. The Help dialog boxes will help you decide how to best clip your image. Remember that page segments do not really relate to page margins. The Clip Limits are really specifying that the AFP driver is selectively choosing which portion of the printed document or image will be used as the page segment. Again, the Help text is very valuable for making clipping decisions.
4. If Print Text as Graphics is set to On, any text included in your overlay or Page Segment will be converted to an image. This is what you want. If you select Off for this option, your printed output will probably not match your Windows application. Save time by leaving this set to On.

AFP driver advanced document properties

AFP driver clip limits

When your settings are set properly, click OK on this Properties screen and click Print or OK from your application to send the document to the driver. Because you configured the driver to output to FILE rather than LPT1 or some other actual port, it will pop up a small dialog box asking you to save the file.

You can save your AFP source file as whatever you want. The extension does not matter, but we recommend saving overlays as .OVL and page segments as .PSG. This helps you better organize your AFP files, and has the additional benefit of allowing you to configure the AFP Workbench Viewer to be able to automatically load and preview your AFP resources before you transfer them to the IBM System i products and convert them into AFP objects. Double-click on your resulting .OVL or .PSG file, and you will be prompted to select the application that will open the files by default.

Open With dialogue box

Transferring the PC File to the IBMi

Now that you have created your AFP resource file, you are ready to transfer the file to your System i. Most commonly, the AFP Manager in iSeries Navigator is used to automate the entire process. If that is not available, you may use FTP or iSeries Netserver to manually transfer the file over.
  • - Automated transfer with AFP Manager

    1. Launch iSeries Navigator.
    2. In the top-left panel click plus symbol next to the desires iSeries and select AFP Manager.
    3. In the bottom-right panel click on the import option for the resource type you wish to create (Overlays or Page Segments).
    4. Browse for the source file name, which is the name of the file that you generated when you "printed" through the IBM AFP printer driver from your Windows application.
    5. Type the resource name, which is the name you want to use for the overlay.
    6. Browse for the library where you want the resource stored.
    7. Type a description, which will be the text description used for the *OVL object.
    8. Specify an object authority (the default is "library create"), leave the data type set to AFPDS, and click OK.
    9. Once the Import dialog box has disappeared, verify that the object has been created. This can be done by looking for the resource under AFP Manager, or by utilizing the WRKOBJ command on the System i.
  • - Manual transfer with FTP

    A physical file must be created in the operating system before the AFPDS resource can be created. The physical file should be created with a record length of 32766 and a record format level check of *NO for the resource to be created properly. On the operating system command line, type the following:


    Press the Enter key.

    To begin the FTP, do the following:

    1. At the DOS prompt, type the following:

    ftp system_name

    Press the Enter key.
    2. To change to binary, type the following:


    Press the Enter key.
    3. To change to the library where the physical file is in the operating system, type the following:

    cd library

    where library is the name of the library. Press the Enter key.
    4. To change to the directory on the PC where PC is located, type the following:

    lcd directory

    where directory is the name of the directory. Press the Enter key.
    5. To put the PC file, type the following:

    put PC_file_name OS400_file_name.OS400_member_name

    where PC_file_name is the name of the file on the PC and OS400_file_name.OS400_member_name is the file and member name on the IBM i system. Press the Enter key.
    Here is what a successful FTP might look like:

    C:\>ftp systemname
    Connected to
    220-QTCP at SYSTEM.
    220 Connection will close if idle more than 20 minutes.
    User ( kschroe
    331 Enter password.
    Password: XXXXXX
    230 KSCHROE logged on.
    ftp> bin
    200 Representation type is binary IMAGE.
    ftp> cd qgpl
    250 "QGPL" is current library.
    ftp> lcd c:\
    Local directory now C:\.
    ftp> put logo.ovl overlays.logo
    200 PORT subcommand request successful.
    150 Sending file to member LOGO in file OVERLAYS in library QGPL.
    250 File transfer completed successfully.
    ftp: 4531 bytes sent in 0.00Seconds 4531000.00Kbytes/sec.
    ftp> bye
    221 QUIT subcommand received.

    Creating the Operating System Resource

    Once the source file has been FTPed to a physical file, the AFP resource must be created..

    Use the Create Overlay (CRTOVL) command for overlays and medium overlays. To create an overlay, on the operating system command line type the following:

           DATATYPE(*AFPDS) TEXT('Overlay created using the IBM AFP driver')

    Press the Enter key.

    Use the Create Page Segment (CRTPAGSEG) command for page segments. To create an page segment, on the operating system command line type the following:

              TEXT('Page Segment created using the IBM AFP driver')

    Press the Enter key.

    After the overlay or page segment is successfully created, it is ready to use whenever you create new operating system spooled files. For best results, the spooled files might need to be created with a device type of *AFPDS. This is necessary if you are planning to use AFPDS resources to print to an ASCII printer (for example, a Lexmark Optra or HP LaserJet printer) using the AFPDS-to-ASCII function of Host Print Transform.
  • - Transfer with iSeries Netserver

    On the iSeries, create a physical file to hold the AFP data:


    A shared folder must be assigned or a network drive must be mapped that points to the i5/OS as follows:


    When you go to print from the PC using the AFP driver, you will get prompted for the file name. Specify, for example, Y:\MYOVRLAY.MBR,
    where Y is the drive that you mapped and MYOVRLAY is the name of the member in the physical file to create. The name must follow standard iSeries member naming convention, and the extension must be .MBR.

    Press the Enter key. At this point, you are ready to create the AFPDS Resource on the operating system. For example,


Testing your new file

If you have Advanced Function Printing Utilities (AFPU) installed on the iSeries, you can quickly test your new file.
  • - Testing an Overlay with AFPU

    1. Use the Start AFP Utilities (STRAFPU) command to start the Advanced Function Printing Utilities (AFPU).
    2. Select Option 22 (Work with overlays).
    3. Find the overlay to be tested by using the Library, Overlay and/or Position to prompts on the Work with Overlays screen.
    4. Select Option 6 (Print) next to the overlay.
    5. The output queue prompt should be set to the name of an output queue where the spooled file is to be created. AFPU will generate an *AFPDS spooled file that contains the overlay and will place that spooled file in the output queue that is specified.
  • - Testing a Page Segment with AFPU

    1. Use the Start AFP Utilities (STRAFPU) command to start the Advanced Function Printing Utilities (AFPU).
    2. Select Option 23 (Work with page segments).
    3. Find the page segment to be tested by using the Library, Overlay and/or Position to prompts on the Work with Page Segments screen.
    4. Select Option 6 (Print) next to the page segment.
    5. The output queue prompt should be set to the name of an output queue where the spooled file is to be created. AFPU will generate an *AFPDS spooled file that contains the page segment and will place that spooled file in the output queue that is specified.

Without AFPU an overlay can be tested by setting the name in the FRONTOVL field of an *AFPDS spooled file. For example, OVRPRTF FILE(QPDSPNET) DEVTYPE(*AFPDS) FRONTOVL(YOURLIB/YOUROVL), followed by DSPNETA OUTPUT(*PRINT). A page segment, however, would require an externally-described printer file that uses the PAGSEG (Page Segment) DDS keyword and an RPG, C, or COBOL program that generates a spooled files using the externally-described printer file.
Video Resources for Installing and Using the AFP Driver.

These videos show how to install and configure the ADP driver, and how to use the AFP Driver to crate a high quality page segment.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number


Document Information

Modified date:
03 November 2021