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,
https://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component
You can also refer to more information about how to call doc2any.exe from a Windows Service from following web pages,
https://www.verydoc.com/blog/running-doc2any-from-java-program-by-run-as-service-option.html
https://www.verydoc.com/blog/how-to-use-doc2any-from-a-windows-service.html
https://www.verydoc.com/blog/run-office-to-pdf-converter-or-doc2any-in-unattended-user-account.html
https://www.verydoc.com/blog/doc2any-command-line-and-sdk-supported-document-formats.html