_______________________________________________________________
Document Information
| Document Number: | 5184341 |
| Functional Area: | |
| Subfunctional Area: | Client Access/400 Printer Drivers |
| Sub-Subfunctional Area: | IBM AFP Printer Driver |
| OS/400 Release: | V5R3M0; V5R4M0; V6R1M0 |
| Product: | IBM ISERIES CLIENT ACCESS EXP (5722XE100) SYSTEM I ACCESS FOR WINDOWS (5761XE100) |
Document Title
Creating AFP Resources Using the IBM AFP Printer Drivers
Document Description
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
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.
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. |
| 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. |
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. |
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.
Transferring the PC File to the i5/OS
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:
CRTPF FILE(QGPL/AFPRES) RCDLEN(32766) MAXMBRS(*NOMAX) LVLCHK(*NO)
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: bin 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 file_name is the name of the file. Press the Enter key. |
C:\>ftp systemname
Connected to system.com.
220-QTCP at SYSTEM.
220 Connection will close if idle more than 20 minutes.
User (system.com:(none)): 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:
CRTOVL OVL(QGPL/OVERLAY) FILE(QGPL/AFPRES) MBR(OS400_member_name) 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:
CRTPAGSEG PAGSEG(QGPL/PSEGMENT) FILE(QGPL/AFPRES) MBR(OS400_member_name) +
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.
Manual transfer with iSeries Netserver
Before the AFPDS resource can be created in Operating System, the PC file must be copied to an operating system folder using a Client Access/400 (or PC Support/400) Shared Folder or Network Drive.
First, a shared folder must be assigned or a network drive must be mapped that points to the i5/OS as follows:
\\as400_NetServer\QDLS\AFPRES
Note: The QDLS folder must be shared in iSeries NetServer before you can map the drive on your PC.
After the drive is assigned or mapped, the page segment or overlay file can be copied to the operating system from an Command Prompt, File Manager, or Windows Explorer.
Copying the QDLS Document to an i5/OS Database File
A physical file must be created on the operating system before the AFPDS resource can be created. The physical file must 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:
CRTPF FILE(QGPL/AFPRES) RCDLEN(32766) MAXMBRS(*NOMAX) LVLCHK(*NO)
Press the Enter key. Next, the data in the operating system folder must be copied into the physical file. To create an overlay, on the operating system command line type the following:
CPYFRMPCD FROMFLR(AFPRES) TOFILE(QGPL/AFPRES) FROMDOC(OVERLAY) TOMBR(OVERLAY) +
TRNTBL(*NONE) TRNFMT(*TEXT)
Press the Enter key. To create a page segment, on the operating system command line type the following:
CPYFRMPCD FROMFLR(AFPRES) TOFILE(QGPL/AFPRES) FROMDOC(PSEGMENT) TOMBR(PSEGMENT) +
TRNTBL(*NONE) TRNFMT(*TEXT)
Press the Enter key. At this point, you are ready to create the AFPDS Resource on the operating system. Please see the section "Creating the Operating System Resource" under Step 1, above.
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.
__________________________________________________________________
PMR Number: | ||
Related APARs: | N/A | |
Related Public Documents: |
- IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information.
