This project has moved. For the latest updates, please go here.

Concurrent executions fails

Mar 10, 2016 at 12:35 PM
Hello,

we tried to make a concurrent conversion opening two command prompts into the first we execute:
OfficeToPDF.exe 1.pptx 1.pdf
And just after it in the second command prompt we executed:
OfficeToPDF.exe 2.pptx 2.pdf
(*1.pptx and 2.pptx have to be enougth complex to take more than 5-6 seconds to convert so you can execute the two commands in concurrency.)

This causes that only outputs the 1.pdf although in command prompt seems not to finish and in task manager you can see a process of Powerpoint is left behind.

For the second command, no output is generated, command prompt seems not to finish (it freezes) and also left behind a powerpoint process open.

For Word conversion it happens the same but surprisingly for excel it works as expected. Any idea of what could be the problem? Maybe DCOM permissions?

Thank you very much!
Coordinator
Mar 10, 2016 at 12:45 PM
Hi

We would strongly recommend against running multiple instances of OfficeToPDF at the same time. When it converts a document, it starts (or makes use) of an instance of the appropriate Office application. Some Office applications only use a single instance, making the assumption that it's being used in an interactive manner with a GUI. This means that requesting the "active" document for an application is only intended to return one object. Running multiple copies of OfficeToPDF will mean that some of the calls may not return, or return un-expected results.

This limitation is just part of using automation of Office. For truly concurrent conversion, you'd have to look at a solution that avoid Office completely (e.g. Asponse .net components http://www.aspose.com/.net/total-component.aspx)

Regards
Vittal
Marked as answer by cognidox on 3/10/2016 at 4:47 AM
Mar 10, 2016 at 12:49 PM
Hello!

Thank you very much for your reply, we'll try with another component! Althought it seems to fail much more with Powerpoint and sometimes it works... strange behaviour, but of course it should be consequence of what you pointed,

best regards!