Substituting AFP shaded images with colored areas

Many AFP documents contain page areas shaded with a gray box. The AFP data stream defines an image with pels laid out in a regular checker pattern to create a gray shading effect. When trying to display this type of image, however, it often becomes distorted because of the scale factor and resolution of the display hardware.

    Note:
  • To avoid this problem, you can use a colored area instead of the shaded image.

To substitute a shaded image with a color area, add SHADED_AREA definition parameters between the starting <IMAGE>and ending <IMAGE_END> lines of an image information entry in the image map configuration file.

The shaded area definition parameters are:

XPos=n
Specifies the position, in inches, of the left edge of the colored area relative to the left edge of the page.

This parameter is optional because the horizontal position of the incoming AFP image is used if XPos is not specified.

YPos=n
Specifies the position, in inches, of the top edge of the colored area relative to the top edge of the page.

This parameter is optional because the vertical position of the incoming AFP image is used if YPos is not specified.

XSize=n
Specifies the colored area width, in inches.

This parameter is optional because the transform uses the width of the incoming AFP image if XSize is not specified.

YSize=n
Specifies the colored area height, in inches.

This parameter is optional because the transform uses the height of the incoming AFP image if YSize is not specified.

Shade_R=n
Shade_G=n
Shade_B=n
Specifies the intensity of the red, green, and blue colors used when generating the color of the area. The values given must be in the range 0.0 to 1.0.

When all three values are set to 1.0, white is generated. When all three values are set to 0.0, black is generated.

If these parameters are not specified, the transform uses the color described by the Shade_RGB parameter in the AFP2PDF Transform options file (see Substituting AFP shaded images with colored areas). By default, Shade_R=0.8, Shade_G=0.8, and Shade_B=0.8 creates a light gray color that is used if no other color specification is found.

Radius=n
Indicates the radius of all corners of the shaded area. If specified, the value applies to all four corners that become equally rounded.
The radius value, measured in inches, should be smaller than half the width or half the height of the shaded area.
You can specify individual values for each corner of the shaded area:
Radius_UL=n
Specifies the radius of the upper left corner. If specified, this value overrides the initial Radius=n value, for this corner only.
Radius_UR=n
Specifies the radius of the upper right corner. If specified, this value overrides the initial Radius=n value, for this corner only.
Radius_LL=n
Specifies the radius of the lower left corner. If specified, this value overrides the initial Radius=n value, for this corner only.
Radius_LR=n
Specifies the radius of the lower right corner. If specified, this value overrides the initial Radius=n value, for this corner only.

Layer=n
When the parameter is not specified, the transform uses the Layer parameter from the options file.

For more information on the Layer option parameter, see Substituting AFP shaded images with colored areas.

    Note:
  • If no Layer specification is found, the default value is Layer=2.

Example of colored areas in the image map configuration file

<IMAGE position:(5.250in,0.613in) size:(0.667in,0.800in)> 
SHADED_AREA XPos=5.250 YPos=0.613 XSize=0.667 YSize=0.800 
Shade_R=1.0 Shade_G=0.0 Shade_B=0.0
<IMAGE_END>
<IMAGE position:(0.863in,8.483in) size:(2.400in,0.667in)> 
<IMAGE_END> 
<IMAGE position:(3.596in,8.550in) size:(2.633in,0.700in> 
<IMAGE_END> 
<IMAGE position:(6.162in,8.483in) size:(2.067in,0.604in)> 
<IMAGE_END>

When the first image is encountered, it is substituted with a red, 0.667 x 0.8 inch area positioned at 5.25 x 0.613 inches.

You can define abbreviated versions of the image entries to expand the matching capabilities of incoming AFP images. This can simplify and reduce the number of image entries defined in the configuration file.

To define abbreviated versions:

  1. Edit the image entry
  2. Specify any combination of name, position, and size.

    If the incoming AFP image matches all the characteristics listed for the image entry, the shaded area is substituted.

Example of abbreviated colored areas in the image map configuration file

<IMAGE size:(0.667in,0.800in)> 
SHADED_AREA
<IMAGE_END>

When an incoming AFP image matches the image size information, a colored area with the default color is created.