I want convert office files (DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML) to PDF files from Windows Service

Hello,

I just bought a license for doc2any_cmd. When I start doc2any_cmd manually, it seems to work ok. But I wanted to call it from a windows service, so that it converts the files in the background.

When I start doc2any_cmd through my service (runs with the same user as it works normally), I get a different behavior.

Logfile when i start through the service:
…….
[OK] Open 'E:\webapps\R14620_Mautzusatz.docx' file successful.
[FAILED] Can't get DOC instances correctly.
[FAILED] Conversion failed, maybe you haven't MS Office or 'PDF and XPS SaveAs Add-in' installed.
Exit MS Office Add-in

when I start manually everything is ok:
[OK] Open 'E:\webapps\R14620_Mautzusatz.docx' file successful.
[OK] SaveAs to 'E:\webapps\work\R14620_Mautzusatz.pdf' file.
Exit MS Office Add-in

What does doc2any_cmd look for at this point? What does "[FAILED] Can't get DOC instances correctly." mean in this context?

thank you very much,
Customer
-----------------------------------------------
Thanks for your message, doc2any.exe is using MS Office to convert office files to PDF files, because MS Office can't be run from SYSTEM or Service user account, so you can't run doc2any.exe inside a Windows Service properly.

However, you can call "VeryPDFComRunCmd COM Component" from a Windows Service, and then call doc2any.exe application from "VeryPDFComRunCmd COM Component", this way will solve the MS Office's permission problem. Please refer to more information about "VeryPDFComRunCmd COM Component" from following web pages,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://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

You can also refer to more information about how to call doc2any.exe from a Windows Service from following web pages,

http://www.verydoc.com/blog/running-doc2any-from-java-program-by-run-as-service-option.html

http://www.verydoc.com/blog/run-doc2any-exe-from-windows-service-and-without-ms-office-installed.html

http://www.verydoc.com/blog/how-to-use-doc2any-from-a-windows-service.html

http://www.verydoc.com/blog/run-office-to-pdf-converter-or-doc2any-in-unattended-user-account.html

http://www.verydoc.com/blog/doc2any-command-line-and-sdk-supported-document-formats.html

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

This entry was posted in DOC to Any Converter and tagged , . Bookmark the permalink.

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!