Below is the code I was using in version 7.4 to load a PDF image from a byte array and convert it to a multipage tiff and save it to a file. Version 8 does not have the PdfRenderPageToGdPictureImage method so this doesn't work anymore. I tried using int intPDFImageID = moGdPictureImaging.CreateGdPictureImageFromByteArray(oByte) but the image id always comes back 0. GdViewer1.DisplayFromByteArray(ref oByte) loads the same image just fine but it won't load using moGdPictureImaging.CreateGdPictureImageFromByteArray(oByte). Any help is appreciated.
int intTiffImageID = 0;
GdViewer1.DisplayFromByteArray(ref oByte);
moGdPictureImaging.TiffOpenMultiPageForWrite(true);
for (int i = 1; i <= GdViewer1.PageCount; i++)
{
int intPDFImageID = 0 = GdViewer1.PdfRenderPageToGdPictureImage(300, i);
moGdPictureImaging.ConvertTo1Bpp(intPDFImageID);
if (intTiffImageID == 0)
{
intTiffImageID = moGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(intPDFImageID);
}
else
{
moGdPictureImaging.TiffAppendPageFromGdPictureImage(intTiffImageID, intPDFImageID);
}
moGdPictureImaging.ReleaseGdPictureImage(intPDFImageID);
}
