Creating a color mapping table (example)
This example shows how to create a color mapping table to print an Advanced Function
Presentation (AFP) file that contains pie charts in the color green.
The pie chart appears as a series of horizontal lines. As explained in the chapter
Graphic primitives and attributes
in Graphics Objects Content Architecture for Advanced Function Presentation Reference, these horizontal lines are created by a Pattern Output Primitive with a hexadecimal
value of '0B'(11).
To turn these horizontal lines into a shade of green when using a ColorSpace source group of GOCA to map to a target group value of RGB, specify a low value for red (12), a high value for green (252), and a value under 50 for blue (42) to provide a clear contrast.
- Change to the
/usr/lpp/psf/config
(Linux)C:\Program Files (x86)\InfoPrint\PSF\config
(Windows) directory:For Linux: cd /usr/lpp/psf/config For Windows: cd C:\Program Files (x86)\InfoPrint\PSF\config
- Copy the sample color mapping table configuration file to a file you can customize
for your own purposes:
For Linux: cp cmt.cfg pie1.cfg For Windows: copy cmt.cfg pie1.cfg
- Edit the
pie1.cfg
file:- Add these lines between the BeginSourceDef: and EndSourceDef: keywords:
ColorSpace: GOCA ColorValue: 11 ObjectType: GOCAData
- Add these lines between the BeginTargetDef: and EndTargetDef: keywords:
ColorSpace: RGB ColorValue: 12 252 42
- Save the
pie1.cfg
file.
- Add these lines between the BeginSourceDef: and EndSourceDef: keywords:
- Run the cmt utility to create the color mapping table object file that will be used when you
submit the job for printing:
cmt -i pie1.cfg -o pie1.set
- Run the cmt utility again to verify your color mapping table values:
cmt -i pie1.set -o pie2.cfg
- Compare
pie1.cfg
andpie2.cfg
.If your color mapping table values are valid, they should be the same.