CreateGdPictureImageFromByteArray doesn't work with PDF?
Posted: Thu May 04, 2017 9:34 am
Hello,
In my WPF application the following code doesn't work for creating and displaying PDF images.
I can resolve around this by using DisplayFromByteArray() instead of DisplayFromGdPictureImage(AktifImageID) method and directly load it from byte[] and it shows the image but then my undo implementation becomes broken and therefore lose my ability to make changes on the image.
this and many other changes on the image doesn't work anymore if I do that, screen completely goes blank obviously whatever I click that can make a change on the image. I checked and noticed that AktifImageID returns 0 from that method and getstat() says "UnsupportedImageFormat". So this implementation was originally designed for TIFF images but we want to make it work with PDF also. Is there any other way?
I appreciate any kind of help.
In my WPF application the following code doesn't work for creating and displaying PDF images.
Code: Select all
if (evrak.EvrakResim != null)
{
AktifImageID = gdPictureImaging.CreateGdPictureImageFromByteArray(evrak.EvrakResim);
}
YedekImageID = gdPictureImaging.CreateClonedGdPictureImage(AktifImageID);
mGDViewer.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer;
mGDViewer.DisplayFromGdPictureImage(AktifImageID);
mGDViewer.Refresh();
Code: Select all
mGDViewer.DisplayFromGdPictureImage(YedekImageID);
gdPictureImaging.ReleaseGdPictureImage(AktifImageID);
AktifImageID = gdPictureImaging.CreateClonedGdPictureImage(YedekImageID);
I appreciate any kind of help.