The CreateRasterPageFromPDFPage sample demonstrates this functionality. See Samples.
The following CreateRasterPageFromPDFPage sample illustrates how you can create a raster page from a PDF page:
Implementation of this method uses only the ImGearPDFPage.Rasterize(int bitDepth, int xResolution, int yResolution) method of ImageGear. Argument bitDepth defines the resulting image bit depth. In the above sample, the value 24 is used, however other values can be used. Arguments xResolution and yResolution define the resolution of the output raster image. For example, in the sample above, the region #region setResolution can be replaced for fixed resolutions as follows:
Copy Code | |
---|---|
xResolution = 300; yResolution = 300; |
These resolutions will be used for the new image, i.e., in resultImage.DIB.ImageResolution.