pdfConvertPageToBitmap3

Convert a page to a bitmap in memory.
int pdfConvertPageToBitmap3(PDFHandle pdf, int page, double hDPI, double vDPI, int color, int reverseBytes, int rowPad, int upsideDown, PDFImageHeader *imgHdr, char **bits)
This function converts a PDF page to a bitmap in memory. It is identical to pdfConvertPageToBitmap2, except that it allows the horizontal and vertical resolutions to be controlled independently.

The arguments are:

The pdfImageDevNToRGB mode produces RGB output like pdfImageRGB, but does the rasterization in DeviceN (CMYK + spot colors) so overprint previews will be more accurate.

The pdfImageGrayToMono 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.

The pdfConvertPageToBitmap2 function returns pdfOk if successful, otherwise an error code.

The caller is responsible for freeing the bits pointer after using it, by calling pdfFreeMemory.

C:
int reverseBytes, rowPad, upsideDown; PDFImageHeader hdr; char *bits; reverseBytes = 0; /* RGB ordering */ rowPad = 1; /* no extra padding on rows */ upsideDown = 0; /* store top row first */ pdfConvertPageToBitmap3(pdf, 5, 200, 205, pdfImageRGB, reverseBytes, rowPad, upsideDown, &hdr, &bits); ... pdfFreeMemory(bits);
pdfWritePageBitmap
pdfConvertPageToBitmap
pdfConvertPageToBitmap2
pdfConvertRegionToBitmap
pdfConvertRegionToBitmap2
pdfConvertRegionToBitmap3