Getting COM class factory error
- Get link
- X
- Other Apps
1) convert pdf file text , xml formats using adobe javascript object "saveas" function
2) works fine first few times when run/debug application.
"retrieving com class factory component clsid {85de1c45-2c66-101b-b02e-04021c009402} failed due following error: 80080005."
but when restart machine , run application again starts working , converts pdf xml/txt. have licensed version of acrobat pro installed on machine , using latest acrobat sdk 9 interop dlls.
acroapp
oapp = new acroapp();
acroavdoc oavdoc = new acroavdoc();
acropddoc odoc = new acropddoc();
//hide acrobat
oapp.hide();
object ojs = new object();
string inputfilename, outputfilepath, conversionid; inputfilename = getfilename(inputfilepath);
if (conversionfileformat == "xml") { outputfilepath = inputfilepath.tolower().replace(
"pdf", "xml"); conversionid =
"com.adobe.acrobat.xml-1-00"; }
else
{
outputfilepath = inputfilepath.replace(
"pdf", "txt"); conversionid =
"com.adobe.acrobat.accesstext"; }
if (oavdoc.open(inputfilepath, inputfilename)) { odoc = (acrobat.
acropddoc)oavdoc.getpddoc(); ojs = odoc.getjsobject();
object[] saveasparam = { outputfilepath, conversionid };
type t = ojs.gettype(); t.invokemember(
"saveas", system.reflection.bindingflags.invokemethod | system.reflection.
bindingflags.public | system.reflection.
bindingflags.instance, null, ojs, saveasparam); }
More discussions in Acrobat SDK
adobe
- Get link
- X
- Other Apps
Comments
Post a Comment