Ootemplate needs python module uno that comes along with openoffice. It also needs an openoffice server that listens on a reachable port in the network. Modern openoffice come with a headless option if you want to run it in a server that does not have the X server. We tested it on 2.4 and 3.1.
When you instantiate the template you can pass the parameters for the oo_context (i.e. a connection done to the server) or a server name and a port. It will setup the connection and put the connection ready for other templates as attribute oo_context of the template.
It no server is passed it will tru to connect locally on port 8100, if that fails it will try to start openoffice but not in headless mode (as in headless mode would hide your documents, you you happen to open them on your desktop).
It you want to open openoffice by yourself, these are some options you may consider.
help: | / -h / -? Lists the available command line parameters in a dialog box . -help shows a long help text, -h shows a short help text. |
---|---|
writer: | Starts with an empty Writer document. |
calc: | Starts with an empty Calc document. |
draw: | Starts with an empty Draw document. |
impress: | Starts with an empty Impress document. |
math: | Starts with an empty Math document. |
global: | Starts with an empty Writer master document. |
web: | Starts with an empty HTML document. |
show: | {filename.odp} Starts with the Impress file {filename.odp} and starts the presentation. Enters edit mode after the presentation. |
minimized: | Starts minimized. The splash screen is not displayed. |
invisible: | Starts in invisible mode. Neither the start-up logo nor the initial program window will be visible. However, the OpenOffice.org software can be controlled and documents and dialogs opened via the API. When the OpenOffice.org software has been started with this parameter, it can only be ended using the taskmanager (Windows) or the kill command (UNIX based systems). It cannot be used in conjunction with -quickstart. More information is found in the OpenOffice.org Developer’s Guide. |
nocrashreport: | Disables the error report tool. |
norestore: | Disables restart and file recovery after a system crash. |
quickstart: | Activates the Quickstarter on Windows systems. The splash screen is not displayed. |
terminate_after_init: | |
Registers some UNO services and ends. The splash screen does not appear. More information is found in the OpenOffice.org Developer’s Guide. |
|
accept: | {UNO string} Notifies the OpenOffice.org software that upon the creation of “UNO Acceptor Threads”, a “UNO Accept String” will be used. More information is found in the OpenOffice.org Developer’s Guide. |
userid: | {user id} Specifies a user’s directory that is used instead of the data from the soffice.ini, bootstrap.ini and sversion.ini files. More information is found in the OpenOffice.org Developer’s Guide. |
p: | {filename1} {filename2} ... Prints the files {filename1} {filename2} ... to the default printer and ends. The splash screen does not appear. If the file name contains spaces, then it must be enclosed in quotation marks. |
pt: | {Printername} {filename1} {filename2} ... Prints the files {filename1} {filename2} ... to the printer {Printername} and ends. The splash screen does not appear. If the file name contains spaces, then it must be enclosed in quotation marks. |
o: | {filename} Opens {filename} for editing, even if it is a template. |
view: | {filename} Creates a temporary copy of {filename} and opens it read-only. |
n: | {filename} Creates a new document using {filename} as a template. |
nologo: | Disables the splash screen at program start. |
nodefault: | Opens the backing window. The backing window opens also when you call the program file directly without any start parameter. |
display: | {display} Sets the DISPLAY environment variable on UNIX based platforms to the value {display}. This parameter is only supported by the start script for the OpenOffice.org software on UNIX based platforms. |
headless: | Starts in “headless mode” which allows using the application without user interface. This special mode can be used when the application is controlled by external clients via the API. |