How to schedule documents4j server standalone as windows service using procrun?

后端 未结 1 1234
一生所求
一生所求 2021-01-24 06:29

I have been trying to schedule the documents4j as windows service using procrun for RTF to PDF conversion but it keeps throwing the following error:

com.document         


        
相关标签:
1条回答
  • 2021-01-24 06:43

    Have you read the information on running documents4j with Word as a Windows service?

    documents4j might malfunction when run as a Windows service together with MS Office conversion. Note that MS Office does not officially support execution in a service context. When run as a service, MS Office is always started with MS Window's local service account which does not configure a desktop. However, MS Office expects a desktop to exist in order to run properly. Without such a desktop configuration, MS Office will start up correctly but fail to read any input file. In order to allow MS Office to run in a service context, there are two possible approaches of which the first approach is more recommended:

    On a 32-bit system, create the folder C:\Windows\System32\config\systemprofile\Desktop. On a 64-bit system, create the folder C:\Windows\SysWOW64\config\systemprofile\Desktop.

    Further information can be found on MSDN. You can manipulate MS Window's registry such that MS Office applications are run with another account than the local service account. This approach is documented on MSDN. Note that this breaks MS Window's sandbox model and imposes additional security threats to the machine that runs MS Office.

    0 讨论(0)
提交回复
热议问题