Page 1 of 1

Load Thumbnails

Posted: Wed Sep 28, 2016 2:10 am
by ejbrandino
Hi,

I tried to load pdf thumbnails to the ThumbnailEx component using the code below but the thumbnails shows for a split second only and it disappears. I think I've done it wrong.

GdPicturePDF oGdPicturePDF = new GdPicturePDF();
GdPictureStatus status = oGdPicturePDF.LoadFromFile(filePath, false);
if (status != GdPictureStatus.OK)
{
MessageBox.Show("Error opening the PDF", "Error " + status.ToString());
return;
}
ThumbnailEx1.LoadFromGdViewer(GdViewer1);
GdViewer1.DisplayFromGdPicturePDF(oGdPicturePDF);

Can you guide me please. Thank you very much.

Re: Load Thumbnails

Posted: Wed Sep 28, 2016 6:06 pm
by Loïc
Hi,

Please replace:

Code: Select all

ThumbnailEx1.LoadFromGdViewer(GdViewer1);
GdViewer1.DisplayFromGdPicturePDF(oGdPicturePDF);
by:

Code: Select all

GdViewer1.DisplayFromGdPicturePDF(oGdPicturePDF);
ThumbnailEx1.LoadFromGdViewer(GdViewer1);
With best regards,

Loïc

Re: Load Thumbnails

Posted: Mon Oct 03, 2016 12:18 am
by ejbrandino
Works great!! Thank you so much Loic..you're really a big help..