Load Thumbnails

Example requests & Code samples for GdPicture Toolkits.
Post Reply
ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Load Thumbnails

Post by ejbrandino » Wed Sep 28, 2016 2:10 am

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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Load Thumbnails

Post by Loïc » Wed Sep 28, 2016 6:06 pm

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

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Load Thumbnails

Post by ejbrandino » Mon Oct 03, 2016 12:18 am

Works great!! Thank you so much Loic..you're really a big help..

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest