Options and values

This sections lists the options and values for the gif2afp transform:
@FileList
Specifies a name of a file that contains a list of files to be processed by the transform. If the @ option is present, the output file defaults to standard output, even if the list of files contains only a single entry. Multiple @ options are allowed. Also see the -f and -z options. The @ is not preceded by the dash, and is implemented to maintain compatibility with the ps2afp transform.
-a {ioca | ioca10 | ioca11 | im1 | PS.2}
-a {IO1_G4 | IM1 | IO1 | IO1_MMR | PSEG_IO1_G4 | PSEG_IM1 | PSEG_IO1 | PSEG_IO1_MMR | OVLY_IO1_G4 | OVLY_IM1 | OVLY_IO1 | OVLY_IO1_MMR}
Choice of the output image type. The first syntax selects between the IOCA FS 10 (ioca, ioca10), IOCA FS11 (ioca11), IM1, and PostScript Level 2 (PS.2) output. IOCA FS10 and IM1 yield bi-level images, while IOCA FS11 results in 4-bit or 8-bit gray or 24-bit color output (see option -outbits). The output compression algorithm is set using the option -cmp. To set the page type (page, overlay, page segment or object), use the -pagetype option.

The second syntax is to maintain compatibility with the ps2afp transform, and sets the image type (IO1 for IOCA FS10 or IM1 for IM1 output), compression (G4 for Group 4 or MMR for Group 3), and page type (PSEG for page segment or OVLY for overlay). If PSEG or OVLY is not specified, the output is a printable page. If no compression algorithm is specified, the output is not compressed. The second syntax cannot be used for IOCA FS11 output.

Some older printers do not support IOCA images. In such cases, the IM1 output type should be chosen. IM1 images are uncompressed and thus use more space. The processing might also take longer since the IM1 image cannot be scaled by the printer and so internal scaling algorithms must be used. See option -alg.

The default is ioca for IOCA FS10 output compressed using the Group 4 algorithm.

This option is similar to the image-out-format document attribute on the pdpr command.

-alg {afp | alg1 | alg2 | alg3}
-alg {htod1 | htfs}
-alg htcal1
Choice of the scaling and halftoning algorithms. You can specify multiple choices, separated by commas, for one -alg option. The effect is the same as specifying multiple -alg options. For example, -alg htfs,htcal is equivalent to -alg htfs -alg htcal.

The scaling algorithms are:

  • If afp is chosen, the scaling is done using the default algorithm in the printer. This makes the transform much faster. If the image must be reduced, however, this algorithm might drop some information from the image, such as thin lines.
  • alg1 activates the internal scaling algorithm to scale the image explicitly to the specified size. This algorithm is guaranteed not to discard any ink. White space in the image, however, might be lost (that is, features close to one another might merge). This algorithm makes the transform run longer, and might occasionally make for a dirty image, since the occasional noise pixels in the scanned images tend to be amplified.
  • alg2 activates the more flexible version of alg1. If this algorithm is selected, option -clean can be used to specify the amount of ink cleanup to be performed. Option -clean 0.0 makes the algorithm alg2 perform like alg1 (albeit more slowly). Increasing the value specified in -clean discards more and more ink, until -clean 1.0 results in a blank page.
  • alg3 activates a scaling algorithm that works by deleting or duplicating rows and columns in the image. This is a fast general-purpose algorithm.

For bi-level images, the default is afp if the output image type is IOCA and alg3 if the output image type is IM1. For color images with bi-level output, the scaling is always done before the halftoning algorithm. If a grayscale or color output is chosen (-a ioca11), this option is ignored and the algorithm is set to afp.

The halftoning algorithms are:

  • htod1 uses an ordered dither with a screen derived from the value of the -thresh option. The default is an 85 line per inch screen.
  • htfs uses the Floyd-Steinberg algorithm.
  • htcal1 recalibrates the halftoning algorithm for each image. htcal1 forces the transform to read the whole image into memory and requires an additional pass through the image. It should be used only for very light or very dark images.

The default is htod1. Each halftoning algorithm uses a different internal default calibration curve. If the automatic calibration is turned on, a still different set of calibration curves are used.

See options -clean, -gcorr, -ink, -paper, -scale, -thresh, -l, -w, -x, and -y.

-CConfigurationFileName
The name of a configuration file containing option-value pairs. If multiple -C options are given on the command line, they are processed in order. Specifying the configuration file on the command line overrides any specification done using the GIF2AFP_C environment variable.

The default configuration file is /usr/lpp/psf/gif2afp/gif2afp.cfg with InfoPrint Manager for AIX InfoPrint Manager for Linux.

-clean {0.5 | x.xxx}
The internal scaling algorithm alg2 allows for variable thresholding. The scaled pixel is declared painted if the fraction of its area greater than the threshold is painted in the original image. The value x.xxx is a real number between zero and 1 inclusive and gives this threshold.

If the option -clean 0.0 is issued, alg2 behaves like alg1 and turns on a pixel as long as any part of the pixel has been painted in the original image. -clean 1.0 results in a blank image because the output pixels are never painted.

Setting -clean 0.95 and 0.9999999 turns on the pixels that had essentially all the area painted in the original picture. Depending on the data, most of the image will probably be preserved. Increasing -clean by a small amount to 1.0 erases the image. If the scaling algorithm is not alg2, this option is ignored. The default is -clean 0.5.

-cmp {none | mh | mmr | g3 | g4 | jpeg}
Choice of the output image compression algorithm:
none
Uncompressed output
mh
ITU-T T.4 G3 Modified Huffman
mmr
IBM Modified Modified Read
g3
ITU-T T.4 G3 Modified Read
g4
ITU-T T.6 G4
jpeg
JPEG non-differential Huffman coding with baseline DCT. The output image data should be compressed to reduce the file sizes and increase the printing speed.

The default compression is ITU-T T.6 Group 4 for bi-level images and no compression for grayscale or color images. Some printers might not support Group 4 compression algorithm and require using the -cmp option to select a different one. The JPEG algorithm can compress only 8-bit grayscale and 24-bit color images. 4-bit grayscale images cannot be compressed.

-cmrpathsearchPath[,searchPath...] [-cmrpathsearchPath[,searchPath]...]
Specifies the search order for locating color resources. This search order is a series of directory paths that color resources are located in. If you specify two or more -cmrpath flags, InfoPrint will concatenate these search orders.
-cropt,b,l,r[i | m | p | d]
Image cropping. t,b,l,r specify how much should be cropped from the image top, bottom, left edge, and right edge. The numbers are floating point and can be either positive or negative. Negative numbers indicate that a blank space should be inserted. The units are inches, millimeters, points, and dots (pels), with the default being dots. The cropping is specified in the context of the output page, to that top means the top of the output page and so on, regardless of the -rot option. To crop, the transform will enlarge the image by the amount to be cropped, then crop the specified amount by manipulating the actual bitmap. The resulting image has the size as specified by the explicit (or implicit) -scale option. See also option -j.

If -fit trim is specified, the right and the bottom edge of the image are not cropped. Instead, the image grows as necessary. Because -fit trim causes the output data stream to contain the position and trim specification, the printer discards any extra image.

-devmodelmodel
Specify the device model of the actual device.
-devtypetype
Specify the device type of the actual device.
-fFileList
Specifies the name of a file that contains a list of files to be processed by the transform. If the -f option is present, the output file defaults to standard output, even if the list of files contains only a single entry. Multiple -f options are allowed. See also options @ and -z.
-fit {trim | scale}
Determines whether the printer behavior will be position-and-trim or scale-to-fit if the image is too large to fit on the paper. The default is trim.

This option is equivalent to the image-fit document attribute on the pdpr command.

-gcorrFileName
Specifies a file with grayscale mapping table for halftoning of the grayscale and color images to bi-level for output. The mapping table must be provided to compensate for the printing characteristics of the particular output device and paper type, such as dot gain. This file must contain either:
  • 256 real numbers, one for each level of gray in the 8-bit grayscale image
  • The PostScript settransfer operator
The algorithm converts every image to 8-bit grayscale before applying the halftoning algorithm. The default internal mapping table has been optimized for the 600-pel InfoPrint 4000 laser printer. You shouldn't change this unless you know what you are doing. See also options -alg and -thresh. PostScript code submitted using the -thresh option can have the same effect as -gcorr.
-icmrcolorResourceName[,colorResourceName...] [-icmrcolorResourceName[,colorResourceName]...]
Specifies one or more input or audit color resources. The color resources can be either ICC Profiles or Color Management Resources (CMRs). If you specify two or more -icmr flags on a transform command line, InfoPrint will concatenate the resources together. If two or more resources that are specified by the -icmr flags are for the same color space, InfoPrint will use the last specified resource.
-ink {black | white}
This option is used only with scaling algorithm alg1 or alg2. The GIF images can be either black on white or white on black. The internal scaling algorithm must know which, because ink is preserved at the expense of non-ink The default value, black, indicates that the image is black on white.

If you use the option -inv to print the reversed image, the inversion is done as the data is read by the transform, before any processing is done. The black or white must thus be specified in the terms of the printed image, not in the terms of the input GIF image.

-inline {yes | no}
Specifies whether the output Color Management Resource (CMR) will be placed inline with the data stream. If you specify two or more -inline flags on a transform command line, InfoPrint will use the last specified value.
-intent {relative | perceptual | saturation | absolute}
Specifies the rendering intent. You can also use the -pragma option to specify the rendering intent by setting:
-pragma colorRendering=relative
If you specify two or more -intent flags on a transform command line, InfoPrint will use the last specified value.
-inv
Reverses the image. Areas that are black in the original image become white and vice versa. The reversed image can be either black on white or white on black, depending on the original image.
-is {1 | 3}
Specifies the interchange set version.

Values are:

1
If you specify 1, the output is IS/1 compliant. This is the default value.
3
If you specify 3, the output is IS/3 compliant.
    Note:
  1. Any other value different than 1 or 3 is signaled as error.
  2. If you specify 3 as a value for the -is flag, make sure that the output type selected is one of the following: ioca, ioca10, ioca42, ioca45, FS10, FS42, FS45, IO1, IO1_G4, IO1_MMR, PSEG_IO1_G4, PSEG_IO1, PSEG_IO1_MMR, OVLY_IO1_G4, OVLY_IO1, and OVLY_IO1_MMR. Only these output types are compatible with the IS/3 flag.

-jScanOffsetFileName
Sometimes input images must be shifted to get the desired positioning on the page. The scan offset file contains the directions for shifting. The file has the format of
[attribute]
values
⋮
values
[attribute]
values
⋮
values
Currently, the recognized attributes are [Units] (values millimeters, mm, inches, in, points, dots, pels) [Page_Offset_Type] (values crop or grow) and [Page_Offsets]. The values for page offsets are in the format FileName,Hhoriz,Vvert Each entry refers to a file. The file names must be specified (or at least the leading comma must), but are currently ignored and the offset factors are applied to each file in turn. The same factors are applied to each image in the file. The horiz and vert values are the amount that the image is to be shifted, in the horizontal and vertical direction. The positive directions are down and right (that is, the origin is in the left upper corner of the page). The default units are millimeters. Like the values for the -crop option, the shifts are specified in the output space context.

Extra spaces and blank lines are allowed. Unrecognized attributes and their values are ignored. See the sample file shift.sample.

If the image is moved left or up, part of the bitmap is removed. If the image is moved down or right, removal is governed by the value of the [Page_Offset_Type] attribute. If crop is chosen, the transform removes the requisite amount from the right and bottom edges of the bitmap. If grow is chosen, the transform does not remove any space. The bitmap grows and the trimming, if any, is left to the printer. If the -fit trim option (the default) is specified, [Page_Offset_Type] defaults to grow. For -fit scale, [Page_Offset_Type] defaults to crop.

-l {11i | yyy.yy[d | m | i | p]}
Specifies the paper length. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints. The default unit is dots. If the unit is dots, decimals (if any) are ignored. The default paper length is 11 inches. See options -w to set the paper width or -paper to set both dimensions at the same time.
-lutLookUpTableFile
Specifies the FileName for the color conversion lookup table file. The FileName you specify can be a fully qualified filename.

Fast and accurate conversion between color spaces can be implemented as a multidimensional lookup with an interpolation algorithm for missing nodes. The file specified with the -lut option must contain a valid lookup table for the conversion between the input and output color spaces. The lookup tables currently come in either ASCII (.lut) or binary formats (.lutbin).

-M {0 | nnn}
Limits the amount of memory available to gif2afp. nnn is the maximum amount of memory in kilobytes. A value of 0 means there is no memory limit. nnn can be set from 0 to the maximum value that AIX or Linux allows. The default is 0.
-ms {10 | nnn}
Requires that at least nnn kilobytes of disk space be available on the file system that contains the output file. This limit is enforced every time data is written to the output file. If the output is standard output, this option is ignored. The default is 10. See option -msf.
-msf {0.1 | x.xxx}
The number x.xxx is a real number between 0 and 1. It denotes the minimum space that must be left unused on the file system containing the output file. The space is given as a fraction of the total space in the file system. This limit is enforced every time data is written to the output file. If the output is standard output, this option is ignored. The default is 0.1. See option -ms.
-nosniff
See [-sniff | -nosniff].
-noterm
See [-term | -noterm].
-nov
See [-v | -nov].
-oFileName
Optional output file name. Specify - for standard output.
-ocmrcolorResourceName
Specifies an output color resource. The color resource can be either an ICC Profile or a Color Management Resource (CMR). If you specify two or more -ocmr flags on a transform command line, InfoPrint will use the last specified value.
-otag {none | normal | passthru}
Specifies how the output AFP will be tagged with color information. The allowed values are:
none
There will be no tagging in the output AFP.
normal
InfoPrint will use the specified -ocmr value to tag the output AFP as an input (audit) Color Management Resource (CMR).
passthru
InfoPrint will use the specified -ocmr value to tag the output AFP as both an input (audit) CMR and an output (instruction) CMR.
If you specify two or more -otag flags on a transform command line, InfoPrint will use the last specified value.
-outbitsNumberOfOutputBits
Sets the number of bits per pel in output. This value must be 1, 4, 8, or 24. If the output image type is IOCA FS10 or IM1, the number of output bits is set to 1 and this option is ignored. For IOCA FS11 output, the default is 24. This number represents the maximum number of bits used per pel. Thus, even if the number of bits is set to 24, a 4-bit grayscale image is still displayed in 4-bit format.
-outcolor {cmyk | rgb | ycbcr | ycrcb}
Sets the output color model to CMYK, RGB, YCbCr, or YCrCb if the image type is IOCA FS11 and the number of output bits is 24. Otherwise, this option is ignored. The default is ycbcr.
-P 6986
Specifies the port number gif2afp uses to make a connection with the Transform Manager (set by the -S flag) When the -S flag is not specified or the -S flag specifies none, the -P flag is ignored.
6986
The port number if InfoPrint Manager is connected to Transform Manager.
Note: To find out which ports are already being used on your system (although they might or might not be active), look in the /etc/services file.
-p {even | odd | nn | nn-mm | nn-}
Specifies that the output should only contain the specified pages. If no -p option is given, all the pages are output. Multiple -p options can be specified. Their effect is cumulative. Regardless of the order in which the pages are specified, they are always printed in ascending order. The recognized values are:
even
Print all even pages
odd
Print all odd pages
nn
Print page nn
nn-mm
Print pages nn to mm, inclusive.
nn-
Print all pages starting with page nn
Pages are numbered starting with 1.
-pagetype {page | overlay | ovly | pseg | object}
Sets the output page type to be page, overlay, page segment or object. The same page type is set for every page in the output. Thus, unless you use option -p to select a single page, multiple overlays, page segments or overlays are stored in the output file. The default is page. See option -a.
-paper {a5 | a4 | a3 | letter | folio | legal | ledger | xxx.xx,yyy.yy[d | m | i | p]}
Specifies the output paper size. The supported values are:
a3
A3 format (297 by 420 mm or 11.69 by 16.54 inches)
a4
A4 format (210 by 297 mm or 8.27 by 11.69 inches)
a5
A5 format (148 by 210 mm or 5.83 by 8.27 inches)
letter
8.5 by 11 inches (216 by 279 mm)
folio
8.5 by 13.0 inches (216 by 330 mm)
legal
8.5 by 14.0 inches (216 by 356 mm)
ledger
11.0 by 17.0 inches (279 by 432 mm)
xx.xx,yy.yy[d | m | i | p]
Horizontal and vertical page dimensions. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints.

The default paper size is letter. If -paper is not used, the paper size is increased, if necessary, to contain the output image.

See options -l, -w, and -scale.

-r {300 | nnn}
The output device resolution, specified in dots per inch. The default is 300.

This option is equivalent to the default-printer-resolution document attribute on the pdpr command.

-respathdirectory[:directory…]
Sets the search path for resource files, such as the scan offset files and grayscale calibration curve files. If a resource file name is specified as a relative name (does not start with a /), the transform searches every directory in the path, in the order specified in the path, until it finds the file (or fails). See options -j and -gcorr for scan offsets and grayscale calibration curve. The default is the current directory.
-rot {0 | 90 | 180 | 270[p | i]}
The image is rotated in the clockwise direction by the amount specified. The default is zero, that is, no rotation.

If p is specified, the transform sets the output data stream in such a way that the printer performs the actual image rotation. If i is specified, the transform rotates the output bitmap. When i is chosen, the transform takes much longer to run and uses much more memory. If no letter is specified, the default or any previous value (such as the value specified in the configuration file) remains in force. The default is p.

-S ServerName | none
Specifies the name of the system on which the Transform Manager is running. The value is:
ServerName
Any valid workstation name on which the Transform Manager is installed and running. The name is defined in the /etc/hosts file or by a name server, and can be a nickname like molly, or a dotted decimal address like 9.99.9.23.
none
Processes the gif2afp transform locally.
Note: When the -S flag is not specified or the -S flag specifies none, the -P flag is ignored.
-scale {orig | a5 | a4 | a3 | letter | folio | legal | ledger | xxx.xx,yyy.yy[d | m | i |p] | xxx%}
Specifies the output image size. The image is scaled to this size and centered in the area defined by the paper size and margin options. The supported values are:
orig
Preserve the input image size, regardless of the printable paper area.
a3
A3 format (297 by 420 mm or 11.69 by 16.54 inches)
a4
A4 format (210 by 297 mm or 8.27 by 11.69 inches)
a5
A5 format (148 by 210 mm or 5.83 by 8.27 inches)
letter
8.5 by 11 inches (216 by 279 mm)
folio
8.5 by 13.0 inches (216 by 330 mm)
legal
8.5 by 14.0 inches (216 by 356 mm)
ledger
11.0 by 17.0 inches (279 by 432 mm)
xx.xx,yy.yy[d | m | i | p]
Horizontal and vertical image dimensions. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints.
xxx%
Magnification relative to the original image size. Numbers below 100% mean reduction, while Numbers above 100% mean enlargement. For example, -scale 200% causes the output image to be twice as long and twice as wide as the input image.
The default image size is orig.
[-sniff | -nosniff]
Turns automatic conversion to black on white for bi-level images on (-sniff) or off (-nosniff). The automatic conversion algorithm counts the number of 0 and 1 bits in the image. If there are fewer zeros, it assumes the printed features are represented by zeros (white on black), and inverts the image to be black on white. The detection and conversion are done after the conversion specified by the Photometric Interpretation tag is applied (if any).

This option is ignored if the image is not bi-level. The default is -nosniff.

[-term | -noterm]
Disables (-term) or enables (-noterm) error recovery.
  • When error recovery is disabled, on encountering an error in a GIF file, the transform terminates with an error message and a nonzero return code.
  • When error recovery is enabled, the errors in GIF files are treated as non-fatal. The transform tries to recover with the next image in the file, or with the next file. The return code is zero.

The default is -noterm.

-threshFileName
Specifies a file that contains a PostScript Type 1 or Type 3 halftone dictionary. Alternatively, the PostScript code can specify the setscreen operator instead of a Type 1 dictionary. You can use the halftone cell in the dictionary to overwrite the default ordered dither clustered dot halftone cell. If the PostScript code contains a transfer function, either in the halftone dictionary or specified by the settransfer operator, the current grayscale correction curve is overwritten as if -gcorr were used.
[-v | -nov]
Turns verbose mode on (-v) or off (-nov).
  • When verbose mode is on, the transform prints a message as it opens each resource file, then echoes the command line, then prints a message for each file name as it is processed.
  • When verbose mode is off, the transform prints only error messages.

The default is -nov.

-w {8.5i | yyy.yy[d | m | i | p]}
Specifies the paper width. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints. The default unit is dots. The default page width is 8.5 inches. See options -l to set the paper length or -paper to set both dimensions at the same time.
-x {0 | nnn.nn[d| m | i | p]}
Specifies the left margin. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints. The default unit is dots. The default is zero (no margin).
-y {0 | nnn.nn[d| m | i | p]}
Specifies the top margin. The optional units are (d)ots (pels), (m)illimeters, (i)nches, or (p)oints. The default unit is dots. The default is zero (no margin).
-z
Signifies that a list of files to be processed is submitted from standard input. See also options -f and @.