Difference between revisions of "Framework/Article/Command Line Arguments"
From Apache OpenOffice Wiki
m |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Command line arguments = | = Command line arguments = | ||
| − | + | {{AOO}} supports a number of command line arguments to open file or print files and to serve special needs. The following article wants to give an overview about the supported command line arguments. | |
| − | The general command line of | + | The general command line of {{AOO}} is defined as:<br/> |
<code> | <code> | ||
Usage: soffice[.exe] [options] [documents] | Usage: soffice[.exe] [options] [documents] | ||
</code> | </code> | ||
| − | {| cellspacing="0" cellpadding=" | + | {| cellspacing="0" cellpadding="10" border="3" style="border: 1px solid rgb(204, 204, 204); margin: 1em 1em 1em 0pt; border-collapse: collapse; width: 100%;" |
|- | |- | ||
| bgcolor="#dddddd" width="300" | '''Command''' | | bgcolor="#dddddd" width="300" | '''Command''' | ||
| Line 32: | Line 32: | ||
|- | |- | ||
| '''-headless''' | | '''-headless''' | ||
| − | | Suppresses any modal dialog so | + | | Suppresses any modal dialog so {{AOO}} can run without user interaction. This is NOT designed to run AOO as a "background" process. The Office starts and is able to open document views. It's the task of a developer to use the API correctly to assure that no UI is shown (includes -invisible). |
|- | |- | ||
| '''-help/-h/-?''' | | '''-help/-h/-?''' | ||
| Line 62: | Line 62: | ||
|- | |- | ||
| '''-invisible''' | | '''-invisible''' | ||
| − | | Initially no start up screen, no default document and UI is shown. It's possible to show documents via API. This option is not designed to use | + | | Initially no start up screen, no default document and UI is shown. It's possible to show documents via API. This option is not designed to use AOO as a "background" process. The API developer has to make sure that the views are opened non-visible. |
|- | |- | ||
| '''-language=<iso language code>''' | | '''-language=<iso language code>''' | ||
| Line 98: | Line 98: | ||
|- | |- | ||
| '''-plugin''' | | '''-plugin''' | ||
| − | | Make | + | | <s>Make AOO aware that it's embedded in a browser.</s> DEPRECATED |
|- | |- | ||
| '''-psn''' | | '''-psn''' | ||
| − | | Is used for | + | | Is used for interproces communication with the Finder on MacOS X platforms. |
|- | |- | ||
| '''-pt <printer> <documents...>''' | | '''-pt <printer> <documents...>''' | ||
| Line 107: | Line 107: | ||
|- | |- | ||
| '''-portal''' | | '''-portal''' | ||
| − | | DEPRECATED and not supported anymore. Will be removed in future versions. | + | | DEPRECATED <s>and not supported anymore. Will be removed in future versions.</s> |
|- | |- | ||
| '''-quickstart''' | | '''-quickstart''' | ||
| Line 128: | Line 128: | ||
|- | |- | ||
| '''-userid=<path to user configuration>''' | | '''-userid=<path to user configuration>''' | ||
| − | | Start the Office using the provided user installation folder. DEPRECATED | + | | <s>Start the Office using the provided user installation folder.</s> DEPRECATED |
|- | |- | ||
| '''-view <documents...>''' | | '''-view <documents...>''' | ||
| Line 140: | Line 140: | ||
|- | |- | ||
| | | | ||
| − | | Remaining arguments will be treated as | + | | Remaining arguments will be treated as filenames or URLs of documents to open. |
|} | |} | ||
| − | {{Warn| | + | {{Warn|{{AOO}} shows the "Start Center" whenever the command line arguments don't explicitly order the creation/loading of one or more documents.}} |
[[Category:Framework:Article]] | [[Category:Framework:Article]] | ||
Latest revision as of 16:37, 3 November 2025
Command line arguments
Apache OpenOffice supports a number of command line arguments to open file or print files and to serve special needs. The following article wants to give an overview about the supported command line arguments.
The general command line of Apache OpenOffice is defined as:
Usage: soffice[.exe] [options] [documents]
| Command | Purpose |
| -accept=<accept-string> | Specify an UNO connect-string to create an UNO acceptor through which other programs can connect to access the API. |
| -base | Creates a new database document. |
| -calc | Creates a new spredsheet document. |
| -display <display> | Specifies X-display to use in Unix/X11 versions. |
| -draw | Creates a new drawing document. |
| -global | Creates a new global text document. |
| -headless | Suppresses any modal dialog so Apache OpenOffice can run without user interaction. This is NOT designed to run AOO as a "background" process. The Office starts and is able to open document views. It's the task of a developer to use the API correctly to assure that no UI is shown (includes -invisible). |
| -help/-h/-? | Shows a small message box with information about the arguments (Windows) or outputs it to stdout. |
| -helpbase | Opens the OOo help application and shows the Base specific help chapter. |
| -helpbasic | Opens the OOo help application and shows the Basic specific help chapter. |
| -helpcalc | Opens the OOo help application and shows the Calc specific help chapter. |
| -helpdraw | Opens the OOo help application and shows the Draw specific help chapter. |
| -helpimpress | Opens the OOo help application and shows the Impress specific help chapter. |
| -helpmath | Opens the OOo help application and shows the Math specific help chapter. |
| -helpwriter | Opens the OOo help application and shows the Writer specific help chapter. |
| -impress | Creates a new presentation document. |
| -invisible | Initially no start up screen, no default document and UI is shown. It's possible to show documents via API. This option is not designed to use AOO as a "background" process. The API developer has to make sure that the views are opened non-visible. |
| -language=<iso language code> | Preset a user interface language. The Office uses a fallback mechanism if the provided language is not available. |
| -math | Creates a new formula document. |
| -minimized | keeps start up bitmap minimized |
| -n | Always open documents as new files (use as templates). |
| -nodefault | Don't start with an empty document. |
| -nofirststartwizard | Don't show the first start wizard on the first start. A needed default user configuration is copied without user interaction. |
| -nolockcheck | Don't check for remote instances using a .lock file in the user folder. |
| -nologo | Don't show the splash screen. |
| -norestore | Suppress restart/restore after a fatal error. |
| -o | Opens a document regardless whether they are templates or not. |
| -p <documents...> | Print the specified documents on the default printer. |
| -plugin | |
| -psn | Is used for interproces communication with the Finder on MacOS X platforms. |
| -pt <printer> <documents...> | Print the specified documents on the specified printer. |
| -portal | DEPRECATED |
| -quickstart | Start the quickstart service (only available on Windows and OS/2 platform). |
| -quickstart=no | Disable quickstart service. |
| -server | Disables recovery and session management. Command line arguments which would open a document are ignored. No default document will be opened. |
| -show <presentation> | Open the specified presentation and start it immediately. |
| -terminate_after_init | The Office terminates after the initialization phase automatically. |
| -unaccept=<accept-string> | Close an acceptor that was created with -accept=<accept-string>. Use -unaccept=all to close all open acceptors. |
| -userid=<path to user configuration> | |
| -view <documents...> | Open the specified documents in viewer-(readonly-)mode. |
| -web | Creates a new HTML document. |
| -writer | Creates a new text document. |
| Remaining arguments will be treated as filenames or URLs of documents to open. |