Pyodconverter-document conversion

Source: Internet
Author: User

Pyodconverter
Pyodconverter, for python OpenDocument converter, is a Python script that automates Office

Document conversions from the command line using OpenOffice.org.

The script does basically the same thing as the command line tool that comes with jodconverter

But is much simpler. In fact the Python script was released for the people who use jodconverter

Only from the command line (not as a Java library or Web Service) and wowould like a simpler

Alternative.

Is a Python script that uses OpenOffice.org to convert documents from the command line.
This script is easier to implement and jodconverter wants to achieve basic conversion under the command line. In fact, it is released for those commands only

People who use jodconverter in a row (instead of a Java library or a Web Service ). It will be a simple alternative.

Usage
Just like jodconverter, pyodconverter requires OpenOffice.org to be running as a service and

Listening on port (by default) 8100; the simples way to start OpenOffice.org as a service is

From the command line

> "C: \ Program Files \ OpenOffice.org 2.2 \ Program \ soffice"-accept = "socket, Port = 8100; URP ;"
The script expects exactly 2 parameters: An input and an output file names. The document formats

Are inferred from the file extensions.

Since it uses the python/UNO Bridge, the script requires the UNO modules to be already present

In your python installation. Most of the time this means you need to use the Python version

Installed with OpenOffice.org, e.g. on Windows

> "C: \ Program Files \ OpenOffice.org 2.2 \ Program \ Python" documentconverter. py test. ODT test.pdf
Or on Linux

$/Opt/OpenOffice. org2.2/Program/Python documentconverter. py test. ppt test.pdf

Usage:
Like jodconverter, pyodconverter requires OpenOffice.org to listen to a port as a service (8100 by default ),

The simplest way to start a service on the command line is as follows:
For Windows:
> "C: \ Program Files \ OpenOffice.org 2.3 \ Program \ soffice"-accept = "socket, Port = 8100; URP ;"

To run pyodconverter, you need to install the UNO module when installing pyhon. In most cases

Install Python with openofiice.org. (Through the python-UNO Bridge, you can use the standard

OpenOffice.org API. At the same time, you can use python to compile uno components so that python uno components can be run in the office process,

And can be called by Java, C ++, and starbisic scripts .)

This script has two necessary parameters: An input file name and an output file name. The document type depends on the file extension.
On Windows:
> "C: \ Program Files \ OpenOffice.org 2.2 \ Program \ Python" documentconverter. py test. ODT test.pdf

On Linux, the command is as follows:
$/Opt/OpenOffice. org2.3/Program/Python documentconverter. py test.ppt test.pdf
Note the documentconverter. py path. pyodconverter can also be used as a python module for your own scripts. I will use it for PHP scripts as follows

> VI convert. php

<? PHP

System ("/opt/OpenOffice. org3/Program/Python documentconverter. py test.ppt test.swf ");
?>

>/Usr/local/PhP5/bin/PHP convert. php

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.