Getting COM class factory error


i created windows application in vstudio 2008 (using .net 3.5 , c#) using sdk objects :-
1) convert pdf file text , xml formats using adobe javascript object "saveas" function
2) works fine first few times  when run/debug application.
then following error:

"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.

when run/debug application , when code trying create instance of acrobat ,it errors out @ first line:-

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

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support