pdfConvertPageToBitmap2

Convert a page to a bitmap.
int pdfConvertPageToBitmap2(PDFViewerHandle viewer, int page, double dpi, int color, BITMAPINFOHEADER *dibHdr, char **bits)
This function converts the specified page to a bitmap, at the specified resolution (dpi, in dots per inch).

The color argument must be one of the following:

The dibHdr argument points to a BITMAPINFOHEADER object that must be allocated by the caller.

The bits argument returns a pointer to the image data. The caller is responsible for freeing this with pdfFreeMemory.

C:
int p, dpi; BITMAPINFOHEADER dibHdr; char *bits; int err; p = 1; /* convert page 1 */ dpi = 120; /* 120 dots per inch */ err = pdfConvertPageToBitmap2(viewer, p, dpi, pdfImageRGB, &dibHdr, &bits); if (err == pdfOk) { /* use the returned header (dibHdr) and data (bits) */ ... pdfFreeMemory(bits); } else { /* error ... */ }
pdfConvertRegionToBitmap2
pdfFreeMemory