hello,
I'm using c# and Javascript object to do some pdf manipulation. Please see the below code, I ran into an "Unknown Name" error at the last line when trying to get the "children" object from the BookmarkRoot. Getting the "name" and "color" worked fine, but I don't know why I'm getting the "unknown name" error for the "children". Am I missing something? any suggestions?
object jsObj = pdfFinal.GetJSObject();
object bmr = jsObj.GetType().InvokeMember(
"bookmarkRoot",
System.Reflection.BindingFlags.GetProperty,
null, jsObj, null);
object name = bmr.GetType().InvokeMember("name",
System.Reflection.BindingFlags.GetProperty,
null,bmr,null);
object color = bmr.GetType().InvokeMember("color",
System.Reflection.BindingFlags.GetProperty,
null, bmr, null);
//the below line gives Unknown name. (Exception from HRESULT: 0x80020006(DISP_E_UNKNOWNNAME))
object children = bmr.GetType().InvokeMember("children",
System.Reflection.BindingFlags.GetProperty,
null, bmr, null);
Thanks,
John
North America
Europe, Middle East and Africa
Asia Pacific