SignDocument - Command is disabled currently - Urgently  SOLVED

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

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

Post Reply
cvpereira
User
Posts: 4
Joined: Wed Apr 21, 2021 8:55 pm

SignDocument - Command is disabled currently - Urgently

Post by cvpereira » Thu Jun 10, 2021 6:20 pm

Hi everyone

I'm trying to run the command "36516 - SignDocument", but it always shows "Command is currently disabled" in my app. In the full demo, this command works correctly.

I read this topic
https://forum.tracker-software.com/viewtopic.php?f=36&t=16526&p=67217&hilit=sign#p67217
but unfortunately I couldn't make it work. My code is below. I'm using Delphi 5 and Windows 10.

Code: Select all

  Result := False;
  try
     //=> This point my doc is open
     //    Viewer.OpenDocument(AArquivo, '', DocId, 0); => I tried open, but the message continue
    Viewer.SetProperty('Commands[#36516].State', 'OnLine', 0); //Habilitar Assinatura Digital...
    Viewer.DoVerb('', 'ExecuteCommand', 36516, EmptyParam, 0);
    Result := True;
  except
    on ex: EOleException do
      ShowErrorMessage(Viewer, ex.ErrorCode);
  end;
I did everything to work, including calling the OpenDocument method before enabling the command

Best regards

Claudemir
Instituto das Cidades Inteligentes
CommandDisableCurrenty.png
Message on execute command
CommandDisableCurrenty_2.png
Message show that exist open doc and IsOperationGranted is equal 1
SignDocumentFullDemo.png
Executing on the full demo
SignDocumentFullDemo_2.png
the same file Work propertly

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

Re: SignDocument - Command is disabled currently - Urgently

Post by Tracker Supp-Stefan » Mon Jun 14, 2021 11:31 am

Hello cvpereira,

There seems to be another topic with the same issue:
viewtopic.php?f=36&t=16526&p=67173&hili ... 516#p67173
And the problem there was an older build of the Viewer SDK.

Can you please make sure that the "Fill Demo" and your own project are using the same build number?

Kind regards,
Stefan

cvpereira
User
Posts: 4
Joined: Wed Apr 21, 2021 8:55 pm

Re: SignDocument - Command is disabled currently - Urgently  SOLVED

Post by cvpereira » Tue Jun 15, 2021 1:28 pm

Tracker Supp-Stefan wrote:
Mon Jun 14, 2021 11:31 am
Hello cvpereira,

There seems to be another topic with the same issue:
https://forum.tracker-software.com/viewtopic.php?f=36&t=16526&p=67173&hilit=%27ExecuteCommand%27%2C+36516#p67173
And the problem there was an older build of the Viewer SDK.

Can you please make sure that the "Fill Demo" and your own project are using the same build number?

Kind regards,
Stefan
Hi Stefan

I managed to solve it, the Viewer's ReadOnly property was set to "True", when I set it to "False", the command returned "Enabled"

Best regards

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

Re: SignDocument - Command is disabled currently - Urgently

Post by Tracker Supp-Stefan » Tue Jun 15, 2021 3:05 pm

Hello cvpereira,

Glad to hear that you figured it out!

Kind regards,
Stefan

Post Reply