Transforming PCL image data

The output of the PCL transform (the pcl2afp command) is AFP image data for any type of PCL input, whether it be text or images. The image created by the pcl2afp command minimizes white space in an image block by defining the image block size to be exactly the right size to contain all of the black pels of the image. A PCL image might not print if any part of the image lies outside of the valid printable area. In addition, be aware that using form definitions that specify a non-zero logical page origin might move a valid PCL image out of the printable area; thus, the image won't print.

The pcl2afp command, the pcl2afp.cfg configuration file, and the pcl2afpd.cfg configuration file all let you specify the length and the width of PCL images. Before you use the -l and -w flags of the pcl2afp command or modify the pcl_length and pcl_width options in the configuration file, it's helpful to understand how InfoPrint places PCL images on the page.

The next figure shows an example of a PCL image. This image is 8.5 inches high and 11 inches wide, measured from the lower-left corner of the image.

If you want to print the entire image, specify a length of 11i and a width of 8.5i. When InfoPrint prints the image, the upper-left corner of the image is placed at the point on the page called the logical page origin, which is specified in the form definition. The logical page origin is the point on the form where the page of data is positioned, and it is specified as an offset from the top-left corner of the sheet. Therefore, if the form definition has a logical page origin of 0.165 inches from both the left and top sides of the sheet, the top-left corner of the image is placed 0.165 inches down and to the left of the upper left corner of the sheet.

All this gets more complicated if you do not specify the entire image. For example, to crop the image so that you only use the lower left corner, you would specify a width of 7i and a length of 7i with the pcl2afp command.

In this final example, specify a PCL image that is 8.5 inches wide and 11 inches high. Again, the upper-left corner of the transformed image is placed at the logical page origin.

Unless you specify a form definition with the print job that has a zero logical page origin (for example, F100S, F100D, or F100T), the page will not print because part of the image is outside the valid printable area. Specifying the correct form definition is extremely important, particularly when you are printing a full-page image.

The default length and width values specified in the PCL configuration files, pcl2afp.cfg and pcl2afpd.cfg work with the default form definitions that InfoPrint provides for each type of InfoPrint printers.

How to specify exact placement of PCL output using zero vertical and horizontal offset

However, to specify exact placement of your PCL output on the page using a zero vertical and horizontal offset from the top-left corner of the page, do one of these actions:

  • Specify one of these form definitions:
    • F100S
    • F100D
    • F100T
  • Specify an X- and Y-offset value of 0 to override the values set in the form definition, using one of these methods:
    • The -oxoffset and -oyoffset flags on the AIX print commands
    • The X offset and Y offset fields on the AIX SMIT Submit an InfoPrint Job panel
    • The x-image-shift and y-image-shift attributes with the -x flag or in an attributes submitted with the pdpr command

If you specify a 0 horizontal and vertical offset in the form definition, with an AIX print command, or in an attributes file, the image produced by the pcl2afp transform might be printed in the unprintable area of the printer. To avoid printing in the unprintable area, you can specify the -x (X offset) and -y (Y offset) flags on the pcl2afp command. These flags add white space to the top and left side of the image produced by the transform, ensuring that no data will print in the unprintable area. For more information about the unprintable area of your printer, see Advanced Function Presentation: Printer Information.