resetMPDeviceNChannelList
Get the name of a DeviceN color channel (multi-pass DeviceN API).
resetMPDeviceNChannelList()
This function removes the color channel list that controls multi-pass
rasterization by the
convertPageToDeviceNImage
,
convertPageToDeviceNImageWithAlpha
,
convertRegionToDeviceNImage
, and
convertRegionToDeviceNImageWithAlpha
functions. I.e., this
resets the DeviceN rasterization functions to use the regular one-pass
approach, where any color channels beyond the first 32 are converted
to CMYK.
To enable multi-pass rasterization, call addMPDeviceNChannel
one or more times after resetMPDeviceNChannelList
.
C#:
// Print the list of all channels used on <page>.
// This list may contain more than 32 channels.
rast.loadMPDeviceNChannels(page);
int nChannels = rast.getNumMPDeviceNChannels();
for (i = 0; i < nChannels; ++i) {
string name = rast.getMPDeviceNChannelName(i);
... channel <i> = <name> ...
}
// All rasterizations include CMYK as the first four channels, and
// the limit is 32 channels, which means we can rasterize 28 spot
// channels per run. For the first run we write the CMYK bitmaps;
// for subsequent runs we skip them (they'll be identical).
int i = 4;
do {
// rasterize CMYK (channels 0..3) + spot channels i .. i+28
rast.resetMPDeviceNChannelList();
for (int j = i; j < i + 28 && j < nChannels; ++j) {
rast.addMPDeviceNChannel(rast.getMPDeviceNChannelName(j));
}
rast.convertPageToDeviceNImage(page, dpi);
for (int j = (i == 4) ? 0 : 4; j < rast.getNumDeviceNChannels(pdf); ++j) {
string channelName = rast.getDeviceNChannelName(pdf, j);
stdole.IPicture pic = rast.getDeviceNPicture(j);
... use the bitmap for <channelName> ...
}
rast.clearDeviceNImage(pdf);
i += 28;
} while (i < nChannels);