convertPageToPicture2
Convert a page to a Picture object.
convertPageToPicture2([in] int page, [in] double hDPI, [in] double vDPI, [in] int color,
[out, retval] IUnknown **pic)
This function converts a PDF page to a Picture object
(OLE
IPicture
interface). It is identical to
convertPageToPicture
, except that it allows the horizontal and
vertical resolutions to be controlled independently.
The arguments are:
page
= page numberdpi
= 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
pdf.imageMono
, etc.
The imageDevNToRGB
mode produces RGB output like imageRGB
, but
does the rasterization in DeviceN (CMYK + spot colors) so overprint
previews will be more accurate.
The imageGrayToMono
mode does the rasterization in 8-bit grayscale
and converts to 1-bit monochrome at the end. This is useful for files
that use transparency – because 1-bit monochrome mode doesn't
support transparency.
VB:
' convert page 5 to a 144x72 dpi color Picture object
picBox.Picture = pdf.convertPageToPicture2(5, 144, 72, pdf.imageRGB)