Page 1 of 1

SignDocument - Command is disabled currently - Urgently

Posted: Thu Jun 10, 2021 6:20 pm
by cvpereira
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.pdf-xchange.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
CommandDisableCurrenty_2.png
SignDocumentFullDemo.png
SignDocumentFullDemo_2.png

Re: SignDocument - Command is disabled currently - Urgently

Posted: Mon Jun 14, 2021 11:31 am
by Stefan - PDF-XChange
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

Re: SignDocument - Command is disabled currently - Urgently  SOLVED

Posted: Tue Jun 15, 2021 1:28 pm
by cvpereira
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.pdf-xchange.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

Re: SignDocument - Command is disabled currently - Urgently

Posted: Tue Jun 15, 2021 3:05 pm
by Stefan - PDF-XChange
Hello cvpereira,

Glad to hear that you figured it out!

Kind regards,
Stefan