Skip to main content

A Java based driver for py3o

Project description

Juno for py3o

py3o.renderers.juno is a Java driver for py3o to transform an OpenOffice document into a PDF

Prerequisites

Since this is a Java implementation you will need to install jpype and to have a recent Java runtime on the rendering machine. You will also need a running OpenOffice instance. (If you are on windows this can be addressed by using the py3o.renderserver Open Office service.)

This has been tested to build correctly with:

  • Oracle JDK 1.6 and OpenOffice 3.2.1 on Windows 7 and Windows server 2003

  • Oracle JDK 1.6 and LibreOffice 3.4 on Windows 7 64bit

  • OpenJDK and LibreOffice 3.4 on Linux (Ubuntu and RHEL 5)

Usage

from py3o.renderers.juno import start_jvm, Convertor, formats
import datetime

# first arg is the jvm.so or .dll
# second arg is the basedir where we can find the basis3.3/program/classes/unoil.jar
# third argument it the ure basedir where we can find ure/share/java/*.jar containing
# java_uno.jar, juh.jar, jurt.jar, unoloader.jar
# fourth argument is the max memory you want to give to the JVM
start_jvm(
        "/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so",
        "/usr/lib64/libreoffice",
        "/usr/lib",
        "3.3",
        140)
c = Convertor("127.0.0.1", "8997")

t1 = datetime.datetime.now()
c.convert("py3o_example.odt", "py3o_example.pdf", formats['PDF'])
t2 = datetime.datetime.now()

For more information please read the example provided in the examples dir and read the API documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

py3o.renderers.juno-0.3.zip (9.0 kB view details)

Uploaded Source

py3o.renderers.juno-0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

py3o.renderers.juno-0.3-py2.6.egg (11.7 kB view details)

Uploaded Source

File details

Details for the file py3o.renderers.juno-0.3.zip.

File metadata

File hashes

Hashes for py3o.renderers.juno-0.3.zip
Algorithm Hash digest
SHA256 ca532310806ec96732ec6bdc41494f59813de6c047fbd3e65b3b7c6f59b990df
MD5 d4aded9ff9c64029dbcbe925d4613ccd
BLAKE2b-256 fc1e5b6193a48249a490c96233ff1ec0d4d245b00982dc5406af0be524fc4a29

See more details on using hashes here.

File details

Details for the file py3o.renderers.juno-0.3.tar.gz.

File metadata

File hashes

Hashes for py3o.renderers.juno-0.3.tar.gz
Algorithm Hash digest
SHA256 401781f6da1dd2f2cbfbd07a850da9fc961f724f785c0e70443ce5abda7f211d
MD5 7c011c001037d0d7ceb7c039189223c6
BLAKE2b-256 495ad3c78a6bfa7810969e034de35bea94805e371b9fc9311e825b645e07ca51

See more details on using hashes here.

File details

Details for the file py3o.renderers.juno-0.3-py2.6.egg.

File metadata

File hashes

Hashes for py3o.renderers.juno-0.3-py2.6.egg
Algorithm Hash digest
SHA256 3da6c5b28925ab592feb3b1e3c287b0f8a5062f2109b1e761abd1fa3feee5c3e
MD5 c47e369ec81ce4af408845392b25e44d
BLAKE2b-256 3a9b73e7e0076ff5414698b42fd30a49644c3a190a325da93c0719adc7d10d3e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page