Substituting existing images with AFP2PDF Transform
During the AFP2PDF PlusTransform process, you can use the image map configuration file to substitute an AFP image with a previously generated image. The only type of image to substitute is the JPEG format.
To use an existing image, add IMAGE definition parameters between the starting <IMAGE> and ending <IMAGE_END> lines of an image information entry in the image map configuration file.
The image definition parameters are:
- XPos=n
- Defines the position of the left edge of the image relative to the left edge of the page. The units of this parameter are 1440 units per inch.
- YPos=n
- Defines the position of the top edge of the image relative to the top edge of the page. The units of this parameter are 1440 units per inch.
- XSize=n
- Defines the target area width to match the size of the image. The units of this parameter are 1440 units per inch.
- YSize=n
- Defines the target area height to match the size of the image. The units of this parameter are 1440 units per inch.
- Filename=path
- Specifies the fully qualified location and file name for the image.
- Note:
- When you use a blank within the value, the text is enclosed in double quotes.
- ColorFlag=0 | 1
- Specifies the type of image to substitute. This is an optional parameter; if specified, the value is set to 1.
Example of existing images in the image map configuration file
<IMAGE position:(5.250in, 0.613in) size:(0.667in, 0.800in)> IMAGE XPos=0 YPos=0 XSize=900 YSize=200 Filename="c:\images\logo1.jpg" <IMAGE_END> <IMAGE position:(0.863in, 8.483in) size:(2.400in, 0.667in)> IMAGE XPos=0 YPos=0 XSize=500 YSize=300 Filename="c:\images\logo2.jpg" <IMAGE_END> <IMAGE position:(3.596in, 8.550in) size:(2.633in, 0.700in)> <IMAGE_END> <IMAGE name:(S1PSEG01) position:(6.162in, 8.483in) size:(2.067in, 0.604in)> <IMAGE_END>
The first image is replaced by logo1.jpg
and the second image by logo2.jpg
.
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, edit the image entry and specify any combination of name, position, or size. If the incoming AFP image matches all the characteristics listed for the image entry, the image is substituted.
Example of abbreviated image entries in the image map configuration file
<!-- IMAGE name: (S1PSERG01)> IMAGE XPos=0 YPos=0 XSize=500 YSize=300 Filename="c:\images\logo2. jpg" <!-- IMAGE_END -->
When an incoming AFP image matches the name, the substituted image is added to the output.