convertRegionToPicture2
Convert a rectangular region to a Picture object.
convertRegionToPicture2([in] int page,
[in] double x0, [in] double y0, [in] double x1, [in] double y1,
[in] double dpi, [in] int color,
[out, retval] IUnknown **pic)
This function converts a rectangular region of a PDF page to a Picture
object (OLE
IPicture
interface).
The rectangular region is specified by the x,y coordinates of its upper-left and lower-right corners (in PDF coordinates).
The arguments are:
page
= page numberx0
,y0
= upper-left corner of regionx1
,y1
= lower-right corner of regiondpi
= resolution (dots per inch)color
= color setting - one of:imageMono
: 1-bit monochromeimageGray
: 8-bit grayscaleimageRGB
: 8-bit RGBimageDevNToRGB
: 8-bit RGB, rasterized in DeviceN and then converted to RGBimageGrayToMono
: 1-bit monochrome, rasterized in 8-bit grayscale and then converted to 1-bit
viewer.imageMono
, etc.
VB:
' convert the bottom-left corner of page 5 to a 72 dpi color Picture object
picBox.Picture = viewer.convertRegionToPicture(5, 0, 0, 144, 144, 72, viewer.imageRGB)