try
{
FSDKBitmap sdkBitmap = new FSDKBitmap(nWidth, nHeight, (int)FSDKBitmap.bitmapFormat.FSCRT_BITMAPFORMAT_24BPP_BGR, IntPtr.Zero, 0);
System.Drawing.Color c = System.Drawing.Color.White;
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, (int)nWidth, (int)nHeight);
sdkBitmap.fillBitmapRect(c, rect);
CRTInterface.FSDK_RenderPageByGE(pdfPage, nWidth, nHeight, pageRotation, sdkBitmap.m_bitmap);
Byte[] bitmapBuffer = sdkBitmap.getBuffer();
MemoryStream bufferStream;
Bitmap bitmap;
Bitmap bitmapcopy;
bufferStream = new MemoryStream(bitmapBuffer);
PageImage displayimage = new PageImage();
displayimage.pimage = BitmapToImageSource(bufferStream);
count++;
displayimage.X = 0;
displayimage.Y = (nHeight + 20) * count;
sdkBitmap = null;
bitmapBuffer = null;
GC.Collect();
}
catch (System.Exception e)
WriteToLog("RenderPageByGE_Initial" + " - " + e.Message);