The CreateRasterPageFromPDFPage sample demonstrates this functionality. See Samples and Demos.
The following CreateRasterPageFromPDFPage sample illustrates how you can create a raster page from a PDF page:
PDF support needs to be initialized first for this snippet to work. To get familiar with initializing IGNET, initializing PDF support, loading a PDF, saving a PDF, and terminating PDF support, try any one of the
tutorials.
Remarks
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.