Hello We are planning to use your component for unattended documents processing on ~50 workstations. The () application will be invoked by a windows service. The process will be unattended, as such we would like to know about potential pitfalls e.g. run time errors. We know you have server license, but that won't work for us - the processing will be distributed (geographically).
You need run doc2any.exe from an interactive user account instead of default system user account, please refer to the example #6 and example #7 at following web page,
Example 6: Run conversion via "_Service.exe" application,
Please by following steps to run conversion via "_Service.exe" application,
1. Please login your server via Remote Desktop under Administrator user account (or other user accounts who own Administrator right),
2. Please run "_Service.exe" application,
"C:\Program Files\docPrint Pro v5.0\docPrint_Service.exe"
3. Call RunCmd() method to deliver a command line to "docPrint_Service.exe" application,
$com = new COM("DocPrintCom.docPrint");
$com->RunCmd("-i http://www.verypdf.com -o C:\\test\\output.pdf -* XXXXXXXXXXXXXX -d -O 2 -s ShowHTMLStatusBar=1 -l 10000", 0);
Private Sub Command1_Click()
Set docPrint = CreateObject("DocPrintCom.docPrint")
nRet = docPrint.docPrintCOM_Register("XXXXXXXXXXXXXX", "VeryPDF.com Company")
nRet = docPrint.RunCmd("-i http://www.verypdf.com -o C:\output.pdf -* XXXXXXXXXXXXXX -d -O 2 -s ShowHTMLStatusBar=1 -l 10000", 0)
MsgBox "Return value = " & Str(nRet)
4. Close Remote Desktop and leave this user logged in.
*Please Notice: After you reboot the server, you need login your server via Remote Desktop with this user account ("docPrint_Service.exe" was installed inside this user account), and close Remote Desktop, leave this user logged in, when you call RunCmd() function, the conversion will be executed from this user account automatically.
Example 7: Run conversion inside an interactive user account from service or web applications,
Please by following solution to run document conversion inside an interactive user account,
1. Please add "Everyone" user account to "C:\Program Files\docPrint Pro v5.0" folder and sub-folders, give "Full Control" permission to "Everyone" user account,
2. Download CmdAsUser.exe from following page,
You can also download it from following URL directly,
3. Run following command line to test CmdAsUser.exe application,
C:\test\CmdAsUser.exe Administrator . /p password /c "C:\Program Files\docPrint Pro v5.0\.exe" -i http://www.google.com -o C:\test\out.pdf
C:\test\CmdAsUser.exe Administrator . /p password /c "C:\Program Files\docPrint Pro v5.0\.exe" -i C:\test\test.doc -o C:\test\test.pdf
If you can run above command line in Command Line Window correctly, please call above command line from PHP by shell_exec() function or other web applications, then you will get it work properly.
1. You need modify "Administrator" and "password" parameters to correct user name and password in above command line, CmdAsUser.exe will launch doc2pdf.exe from this special user account with administrator privilege.
2. You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please by following steps to solve this 1314 Error,
1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
To resolve this issue:
1. Click Start, click Run, type "secpol.msc", and then press ENTER.
2. Double-click "Local Policies".
3. Double-click "User Rights Assignment".
4. Double-click "Replace a process level token".
5. Click "Add", and then double-click the "Everyone" group
6. Click "OK".
7. You may have to logout or even reboot to have this change take effect.
Please refer to following two screenshots to understand above steps,
Please look at following page for the details about ERROR 1314,
Please refer to following web pages for more information,
If you still can't get it work, please feel free to let us know, we will assist you asap.