Cannot print PDF on Windows Server 2003 using Windows Service

Hi 


I am trying to print pdf from c# code using word interop . I do this by modifying the Registry settings on the server. e.g

 RegistryEditor.RegistryValueWrite(RegistryEditor.HKEY_CONSTANT.HKEY_CURRENT_USER,
                                                          @“Software\PDFCreator\Program”, “SaveFilename”,
                                                          RegistryEditor.REG_TYPE.REG_SZ, fileName);

                        RegistryEditor.RegistryValueWrite(RegistryEditor.HKEY_CONSTANT.HKEY_CURRENT_USER,
                                                           @“Software\PDFCreator\Program”, “AutosaveDirectory”,
                                                           RegistryEditor.REG_TYPE.REG_SZ, directiory);

                        RegistryEditor.RegistryValueWrite(RegistryEditor.HKEY_CONSTANT.HKEY_CURRENT_USER,
                                                          @“Software\PDFCreator\Program”, “AutosaveFilename”,
                                                          RegistryEditor.REG_TYPE.REG_SZ, fileName);

                        RegistryEditor.RegistryValueWrite(RegistryEditor.HKEY_CONSTANT.HKEY_CURRENT_USER,
                                                          @“Software\PDFCreator\Program”, “UseAutosave”,
                                                          RegistryEditor.REG_TYPE.REG_SZ, 1);


This works which I run a stand alone client application i.e Winform, but fails when I run the same code using WCF Service hosted on Windows Service.

The EventViewer has message that PDFCreater has printed the PDF and another message saying that PDFCreator has deleted the PDF document.

please help.

Thanks

Mahesh