Click here to Skip to main content
11,479,486 members (47,545 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Python

I want to convert a word file to pdf using Open office. after doing some research I found[^] which shows to use
"C:\Program Files\OpenOffice.org2.4\program\soffice.exe" -headless -nologo -norestore -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager "C:\Program Files\OpenOffice.org2.4\program\python" test.odt test.pdf
I have used the above script in cmd.exe but it does not work . Do I need to install something to get this working. I want to integrate this into my C# application.

Please help me in this.

Posted 16-Jul-12 2:26am
Nutan R349
darshan_ur at 16-Jul-12 7:55am
if your application is desktop application and you are trying to use a local application like Open Office, you need to have that application installed on the client machine. OR you can try to find a dll for the same the use that dll to convert the application. Other option which i think might work is you can add reference to the soffice to your application and run the Command line by using the soffice.exe in your application folder.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


thanks for your response I have open office installed on my machine and I have also installed Python 2.7., but when I execute the "C:\Program Files\OpenOffice.org2.4\program\soffice.exe" -headless -nologo -norestore -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager "C:\Program Files\OpenOffice.org2.4\program\python" test.odt test.pdf

the system just opens the file Seems like it is not able to detect as a python file. I am stuck with this. Please help me in this.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 255
1 Sergey Alexandrovich Kryukov 215
2 F-ES Sitecore 175
3 Richard MacCutchan 120
4 Frankie-C 104
0 Sergey Alexandrovich Kryukov 7,890
1 OriginalGriff 7,441
2 Sascha Lefèvre 3,064
3 Maciej Los 2,491
4 Richard Deeming 2,335

Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 16 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100