convertRegionToDeviceNImage

Convert a rectangular region to a DeviceN image.
convertRegionToDeviceNImage([in] int page, [in] int regionX, [in] int regionY, [in] int regionW, [in] int regionH, [in] double dpi)
This function rasterizes a rectangular region of a PDF page in DeviceN mode, i.e., with separate color channels for each process color (cyan, magenta, yellow, and black), and for each custom (a.k.a., spot) color.

The rectangular region is specified by the x,y coordinates of its upper-left corner and its width and height - in bitmap coordinates, not PDF coordinates. That is, if the whole-page bitmap would have been 1000 pixels wide and 2000 pixels high, and you request a region with (x,y) = (0,0) and (w,h) = (1000,500), the resulting bitmap will be the top fourth of the page.

After calling convertRegionToDeviceNImage:

Finally, call clearDeviceNImage to release the memory used by convertRegionToDeviceNImage.

To enable an overprint preview rasterization, call setConfig to set the overprintPreview parameter before calling convertRegionToDeviceNImage:

pdf.setConfig "overprintPreview yes"
VB:
rast.convertRegionToDeviceNImage(page, 0, 0, 1000, 500, dpi) nChannels = rast.getNumDeviceNChannels() For i = 0 To nChannels-1 channelName = rast.getDeviceNChannelName(i) channelCMYK = rast.getDeviceNChannelCMYK(i) pic = rast.getDeviceNPicture(i) ' each channel has an 8-bit grayscale bitmap, similar to what ' is returned by convertPageToPicture in imageGray mode ... Next i rast.clearDeviceNImage()
convertPageToDeviceNImage
getNumDeviceNChannels
getDeviceNChannelName
getDeviceNChannelCMYK
getDeviceNPicture
clearDeviceNImage