Transfer content from one GdViewer to another

Discussions about document viewing.
Post Reply
JensN
Posts: 12
Joined: Wed Feb 16, 2011 11:43 am

Transfer content from one GdViewer to another

Post by JensN » Fri Aug 05, 2011 3:43 pm

We are new to GdPicture and looking for a way to transfer the content from one GdViewer to another.
Both viewers are located on different forms. In the background we are working with GdPictureImaging form which the GdViewer loads the images.
We already found a way by transferring the ImageID from the first Viewer and than call CreateClonedPictureFromImage(ImageID) on the other.
The problem is that we have to transfer single and multipage images and the aformentioned approach only works for single pages images.

Thanks in Advance!

Jens

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

Re: Transfer content from one GdViewer to another

Post by Loïc » Sat Aug 06, 2011 2:57 am

Hi,

Just open your image using a GdPictureImaging object that returns an Image identifier.

Then use this image identifier as parameter of the DisplayFromGdPictureImage() method of both GdViewer components.

IE:

Code: Select all

int ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("");
GdViewer1.DisplayFromGdPictureImage(ImageID);
GdViewer2.DisplayFromGdPictureImage(ImageID);
Hope this helps !

JensN
Posts: 12
Joined: Wed Feb 16, 2011 11:43 am

Re: Transfer content from one GdViewer to another

Post by JensN » Sat Aug 06, 2011 4:32 pm

Hi Loïc,

Thanks for your help! It works fine now.

Jens

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests