Displaying and/or Saving Snapshot  SOLVED

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
Wolfgang Weh
User
Posts: 7
Joined: Fri Feb 27, 2015 12:57 pm

Displaying and/or Saving Snapshot

Post by Wolfgang Weh »

Hello,

I would like to get the image of a snapshot when when it has been created.

What I'm doing at the moment...

To detect if a snapshot has been created I look at the mouse notifications:

Code: Select all

Case "Notifications.Mouse"
   TryGetProperty("Notifications.Mouse.msg", e.dataOut, 0)
   If ((e.dataOut IsNot Nothing) AndAlso (e.dataOut = "514")) Then   ' Left Mouse Button Up
      TryGetProperty("Notifications.Mouse.TargetName", e.dataOut, 0)
      If ((e.dataOut IsNot Nothing) AndAlso (e.dataOut = "Pages")) Then    ' Click on the PDF Page
         TryGetProperty("Tools.Active", e.dataOut, 0)
         If ((e.dataOut IsNot Nothing) AndAlso (e.dataOut = "32614")) Then    ' Snapshot Tool Active
            RaiseEvent SnapshotCreated()
         End If
      End If
   End If
If there is a left mouse button up message, on the 'pages' and the snapshot tool is active, then a snapshot has been created.

Then I call "DoEvents" to let the PDF viewer finish it's work, and then try to get the image from the clipboard.

But, at the moment this will always return me the previous snapshot, not the new snapshot.

Any ideas?

Is there a better way to approach this?

Thanks in advance

Wolfgang
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Displaying and/or Saving Snapshot

Post by Tracker Supp-Stefan »

Hi Wolfgang,

I've asked a colleague from the dev team (Vasyl) to take a look, but he is in our Canadian office so the reply from him will come a bit later.

Regards,
Stefan
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Displaying and/or Saving Snapshot

Post by Vasyl-Tracker Dev Team »

Hi Wolfgang.
But, at the moment this will always return me the previous snapshot, not the new snapshot.
I can suggest next solution:

instead of direct call:
RaiseEvent SnapshotCreated()

use timer:
StartTimer(SnapshotCreatedTmId, 10) ; // 10ms or any other small interval

then handle timer-event:

OnSnapshotCreatedTm()
{
StopTimer(SnapshotCreatedTmId);
RaiseEvent SnapshotCreated();
}

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Wolfgang Weh
User
Posts: 7
Joined: Fri Feb 27, 2015 12:57 pm

Re: Displaying and/or Saving Snapshot

Post by Wolfgang Weh »

Hi Vasyl,

yes, that helps, it works :)

Thank you!

Have a nice weekend

Wolfgang
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Displaying and/or Saving Snapshot

Post by Tracker Supp-Stefan »

:)
Post Reply