存档

‘Openoffice’ 分类的存档

JodConverter(Openoffice)支持的格式

2010年3月26日 admin 没有评论

JODConverter automates conversions that are actually performed by OpenOffice.org. This means that if you can convert from format ABC to format XYZ from OpenOffice.org (by opening ABC and saving/exporting to XYZ) then you can do the same with JODConverter. You just have to discover the magic string used by OpenOffice.org as the export filter name. A useful list can be found in the OpenOffice.org Wiki.

That said, JODConverter maintains a registry of the most common formats, their associated file extensions, mime types, and OpenOffice.org filter names to simplify your life. These predefined conversions are shown in the following table:

From (any of) To (any of)
Text Formats
OpenDocument Text (*.odt)
OpenOffice.org 1.0 Text (*.sxw)
Rich Text Format (*.rtf)
Microsoft Word (*.doc)
WordPerfect (*.wpd)
Plain Text (*.txt)
HTML1 (*.html)
Portable Document Format (*.pdf)
OpenDocument Text (*.odt)
OpenOffice.org 1.0 Text (*.sxw)
Rich Text Format (*.rtf)
Microsoft Word (*.doc)
Plain Text (*.txt)
HTML2 (*.html)
MediaWiki wikitext (*.wiki)
Spreadsheet Formats
OpenDocument Spreadsheet (*.ods)
OpenOffice.org 1.0 Spreadsheet (*.sxc)
Microsoft Excel (*.xls)
Comma-Separated Values (*.csv)
Tab-Separated Values (*.tsv)
Portable Document Format (*.pdf)
OpenDocument Spreadsheet (*.ods)
OpenOffice.org 1.0 Spreadsheet (*.sxc)
Microsoft Excel (*.xls)
Comma-Separated Values (*.csv)
Tab-Separated Values (*.tsv)
HTML2 (*.html)
Presentation Formats
OpenDocument Presentation (*.odp)
OpenOffice.org 1.0 Presentation (*.sxi)
Microsoft PowerPoint (*.ppt)
Portable Document Format (*.pdf)
Macromedia Flash (*.swf)
OpenDocument Presentation (*.odp)
OpenOffice.org 1.0 Presentation (*.sxi)
Microsoft PowerPoint (*.ppt)
HTML2 (*.html)
Drawing Formats
OpenDocument Drawing (*.odg) Scalable Vector Graphics (*.svg)
Macromedia Flash (*.swf)

1 HTML can be used as an input format but you should not expect OpenOffice.org to properly render complex web pages as Firefox or IE7 do. Works reasonably well for simple and “printer friendly” web pages only.
2 HTML can be used as an output format but while all other formats always generate a single output file, HTML can produce multiple files. In addition to the HTML file in fact, any images contained in the input document will also be saved in the same directory. This requires extra care in your code, especially in a web environment.

Openoffice官方的說明如下:

http://wiki.services.openoffice.org/wiki/Framework/Article/Filter

Popularity: unranked [?]

为Openoffice.org创建服务

2010年3月26日 admin 没有评论

官方的说明如下:

Windows系统:

Creating a Windows Service lets you have an OpenOffice.org instance always running as a service and listening for connections. That’s what you usually want to do on a server machine. Here is one way to create a Windows Service: use the SRVANY utility that you can download for free as part of the Resource Kit. (This was done on an XP SP2, YMMV.)

  1. I assume you already installed OpenOffice.org and started at least once under the current user
  2. Download and install the Windows Server 2003 Resource Kit Tools
  3. Read How To Create a User-Defined Service
  4. Create a service named OpenOfficeUnoServer following the instructions above; as the Application registry value use C:\Program Files\OpenOffice.org 2.0\program\soffice.exe
  5. Add another value to the Parameters key named AppParameters and set it to -headless -accept=socket,port=8100;urp;
  6. From Control Panel / Administrative Tools / Services open the Properties for the new service and change the Log On account to be Local Service which is a more secure option than SYSTEM
  7. If we stop here the service will start but not actually work. That’s because the service runs as a special account and OpenOffice.org will try to show the license agreement dialog as if it was a new user instead of starting the application. To avoid this, you need to edit share\registry\data\org\openoffice\Setup.xcu (it’s an XML file) inside the OpenOffice.org installation directory and replace this bit
    <prop oor:name="ooSetupInstCompleted">
      <value>false</value>
    </prop>
    <prop oor:name="ooSetupShowIntro">
      <value>true</value>
    </prop>

    with this other one (replace the date with today’s date; it must be later than the OOo installation time)

    <prop oor:name="ooSetupInstCompleted" oor:type="xs:boolean">
     <value>true</value>
    </prop>
    <prop oor:name="LicenseAcceptDate" oor:type="xs:string">
     <value>2006-07-25T17:34:04</value>
    </prop>
    <prop oor:name="FirstStartWizardCompleted" oor:type="xs:boolean">
     <value>true</value>
    </prop>
  8. Start your new service (e.g. from Control Panel / Administrative Tools / Services)
  9. You may need to unblock the new service at the firewall level
  10. From a command prompt do
    > netstat -anp tcp

    this should show a listening on port 8100. Chances are that the service will only listen on the 127.0.0.1 interface; this means you can only connect from the same machine and it’s good from a security point of view. However, if you want to be able to connect from other machines as well you need to change the accept string to "socket,host=0.0.0.0,port=8100;urp;" in the AppParameters registry value

Linux/UNIX系统

Creating a SysV-style init script for starting OpenOffice.org is not difficult but the details depend on your particular OS flavour/distribution.

The tricky part is that OpenOffice.org requires an X server to work. On a headless server, you can use Xvfb as a dummy display for OpenOffice.org.

However since OpenOffice.org 2.3 an X server server is no longer needed; it is now possible to start OpenOffice.org in “true” headless mode simply by making sure the DISPLAY environment variable is not defined:

$ unset DISPLAY
$ soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

Popularity: unranked [?]