First time here? Check out the FAQ!
asked 2012-10-29 22:11:45 +0200
Anonymous
Is it possible to open and handle multiple LibreOffice procsses and run conversions across all of them via C#?
You've asked two questions.
Is it possible to open and handle multiple LibO processes?
I assume you mean concurrently, and the answer is yes. You can't, however, run the same profile concurrently. So, to open multiple LibO processes at the same time, you need to use a not-so-well-documented command line argument:
$ libreoffice "-env:UserInstallation=file:///tmp/LibO_Process1" &
$ libreoffice "-env:UserInstallation=file:///tmp/LibO_Process2" &
This is Unix style syntax for the terminal, but the concept is the same for Windows. Run LibO and pass it the flag telling it to use a different configuration directory for each process. When each LibO completes, you may want to remove those configuration directories.
Note that to connect to each of these instances, you'll need to further tell them to act as "servers" and accept incoming connections:
$ libreoffice "-env:UserInstallation=file:///tmp/LibO_Process1" --accept="socket,port=10001;urp;" &
$ libreoffice "-env:UserInstallation=file:///tmp/LibO_Process2" --accept="socket,port=10002;urp;" &
[ ... ]
Basically, assign each one a port through the UNO string to --accept.
Does LibO have a C# API?
I believe the answer is yes, though I have not used it myself. I just googled and the first page had a number of legitimate hits for how to do it, so I won't go into specifics. Short answer: yes.
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-10-29 22:11:45 +0200
Seen: 116 times
Last updated: Apr 06
Are there plans for a Solaris version of LibreOffice?
Is there a clean, non-broken download?
Del Operator in Libreoffice Math
Re-creating windows search filters
Can't load IA 32-bit .dll on a AMD 64-bit platform
[Meta] What's the relationship between AskLibO and LibO Forum?
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.