[C# 2010] - Synchronize 2 different viewer.

Discussions about document viewing.
Post Reply
Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

[C# 2010] - Synchronize 2 different viewer.

Post by Dr3w » Sat Jan 26, 2013 12:56 pm

Hi at all,
I need a suggestion about the viewer Zoom.
I have a Totem-client solution (2 applications: 1 cliet - 1 totem) that synchronize a document (via wcf, end-user on totem must see the same document as the cliet end user see... rotated as the same way, the same page selected by the thumbnail etc ect).
It's all synchronized well... but I've a problem with the 'start-up' zoom, and its next values, because the viewer (that in my c# apps is the same object) has different width-height on the 2 machines...
Both viewer have the same ZomeMode: FitToViewer. I've tryed with all ZoomMode, but the result is the same: the 2 viewer show the same document with different dimension.

Have you got suggestions?
All the best.

Andrea.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: [C# 2010] - Synchronize 2 different viewer.

Post by SamiKharma » Sun Jan 27, 2013 10:23 am

Hi,

You can do it through three functions and I will explain how, but first, let me suggest that you make your two viewers the same size, as this will make the functionality easier and cleaner to handle, and there is an example on how to do this in the C#-Document Clean Up sample.

You have to get the displayed pixels on the first viewer using:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... teger.html

Then you set the Rectangle of selection on the Second viewer with those coordinates using:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... teger.html

Then you can display it using:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... nRect.html

Best Regards,
Sami

Dr3w
Posts: 22
Joined: Fri Nov 09, 2012 6:22 pm

Re: [C# 2010] - Synchronize 2 different viewer.

Post by Dr3w » Sun Jan 27, 2013 9:18 pm

Good evening Sami,
for many reasons (for now) they must have different size.
I'll try as soon as possible, thoose methods seems the best way to resolve my problem.

Thank you very much for the suggestion and the support.
Andrea.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests