Error Digital Signature C# Acrobat Sdk
Hi.
I am creating an application to sign a pdf from c #.
I am currently having the following problem:
System.Runtime.InteropServices.COMException: 'Nombre desconocido. (Excepción de HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))'
This is the code:
Type AcrobatCAcroAppType;
AcrobatCAcroAppType = Type.GetTypeFromProgID("AcroExch.app");
Acrobat.CAcroApp gapp = (Acrobat.CAcroApp)Activator.CreateInstance(AcrobatCAcroAppType);
Type AcrobatPDDocType;
AcrobatPDDocType = Type.GetTypeFromProgID("AcroExch.PDDoc");
Acrobat.CAcroPDDoc gpddoc = (Acrobat.CAcroPDDoc)Activator.CreateInstance(AcrobatPDDocType);
object jso;
if (gpddoc.Open("C:\\Users\\tmuñoz\\Desktop\\PDFs Para firmar\\Thuban-Nivel 2.pdf"))
{
jso = gpddoc.GetJSObject();
object[] param = new object[1];
param[0] = "C:\\Users\\tmuñoz\\Desktop\\ThomasMuñoz.pfx";
object con = jso.GetType().InvokeMember("SetUserDigitalIDPath",
BindingFlags.InvokeMethod, null, jso, param);
param[0] = "testpassword";
con = jso.GetType().InvokeMember("SetUserPassword",
BindingFlags.InvokeMethod, null, jso, param);
param[0] = jso;
con = jso.GetType().InvokeMember("AddSignature",
BindingFlags.InvokeMethod, null, jso, param);
}
I think the error comes from not finding these functions in the JSO object.
From what I understand these are the sdkAddSignature file.
So I guess I should integrate it into the C # project, but I do not know how to do it.
