Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
In regards to the post by Patrick I must be missing something and was wondering if someone could help me out:
"It most certainly is possible to call JS from C#.
Once you have your JSObject:
jso.AddSignature();
If you are not able to call any functions via the JSObject then you have not declared or assigned it properly"
I have a C# app with a reference to Interop.Acrobat.dll and I am trying to add a bookmark to the PDF. Since this dll is COM I am assuming that it is wrapped with RCW(Runtime Callable Wrapper)? I grabbed the dll from the SDK example project BasicIacJsoVB. I am able to view the properties and methods for strongly typed objects such as AcroApp and CAcroAVDoc. However, for the object returned from GetJSObject() intellisense just shows the methods for the object base class(ToString, Equals, GetHashCode, GetType). I don't see any other methods and the project won't build with the code below. I would prefer not to use late binding as the examples shown in previous posts. Any ideas?
----------------------------------------------------------------------------------------------------------------------------------
string gPDFPath;
object jso;
object BMR;
object BMC;
//hard coding for a PDF to open, it can be changed when needed.
gPDFPath = @"C:\test1\1.pdf";
Acrobat.AcroApp gApp = new Acrobat.AcroAppClass();
// show Acrobat
gApp.Show();
//Set AVDoc object
Acrobat.CAcroAVDoc gAvDoc = new Acrobat.AcroAVDocClass();
// open the PDF
if (gAvDoc.Open(gPDFPath, ""))
{
Acrobat.CAcroPDDoc gPdDoc = gAvDoc.GetPDDoc() as Acrobat.CAcroPDDoc;
jso = gPdDoc.GetJSObject();
BMR = jso.BookmarkRoot();
//BMR.createchild("First Topic", "this.pageNum= 0", 0);
}
-------------------------------------------------------------------------------------------------------------------------------------
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more