How to use doc2any from a Windows Service?

Hi,

We have Doc2Any installed on our server. If I setup the DCOM service to run using the interactive user option files are converted properly. However, if I set it to use a specific user account (with admin privileges). It never gets pass the following line on the log. Please advise on what steps need to be taken to get this to work. We need the ability to convert documents without having using the interactive user account. Thank you.

From Log File:
[Message] Check license information...
[Message] Check utility functions...
[Message] Start the conversion...
[Message] ConvertPDF2PS: Check for "VeryPDF Postscript Writer" Printer.
[Message] ConvertPDF2PS: Installed "VeryPDF Postscript Writer" Printer.
[EXCEL] Convert XLS file to PS file...
[EXCEL] Set silent options...
[EXCEL] Try to open 'E:\IDrive\ECS\Content\\Excel Chart Test.xlsx' file...
Shell Print Office Document To PS File [XLS]...
Try to load 'WINSPOOL.DRV' file...
Load 'WINSPOOL.DRV' file OK.
Shell Print the 'E:\IDrive\ECS\Content\\Excel Chart Test.xlsx' file to PS file...

Customer
---------------------------------------

image

Thanks for your message, in general, it shouldn't appear "Shell Print the..." message, because "Shell Print the..." function is only work when you run it by manual in CMD window, it is not work inside service user account.

What command line options did you use?

Please use following command lines to convert office files to PDF files from service user account,

doc2any.exe D:\test.doc D:\out.pdf
doc2any.exe -nooffice D:\test.doc D:\out.pdf
doc2any.exe -useprinter -useoffice 1 D:\test.doc D:\out.pdf

Please look at following web page about how to switch from service user account to an interactive user account, the conversion will be executed from this interactive user account,

https://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

image

after you set "VeryPDFCom.RunCmd" successful, you can use following ASP code to call doc2any.exe to do the Office documents to PDF files conversion and without any permission problem from now, enjoy it,

<%

set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
strRet = VeryPDFCom.RunCmd2("D:\VeryDOC\doc2any.exe D:\test.doc D:\out.pdf", 5)
Response.Write strRet & vbCrlf

%>

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!