A Python interface to XSL-FO libraries (Conversion HTML to PDF, RTF, DOCX, WML and ODT)
Project description
##########################################################################
# zopyx.convert - XSL-FO related functionalities
#
# (C) 2007, ZOPYX Ltd & Co. KG, Tuebingen, Germany
##########################################################################
A Python interface to XSL-FO libraries.
The packages helps to convert HTML to PDF, RTF, ODT, DOCX and WML using
XSL-FO technology.
Requirements:
-------------
- Java 1.4.0 or higher (1.5.X or 1.6.X are preferred)
- csstoxslfo (included)
- XFC-4.0 (www.xmlmind.com) for PDF support
- XINC 2.0 (www.lunasil.com) for ODT, RTF, DOCX, WML support
- mxTidy (egenix-experimental package from www.egenix.com)
Installation:
-------------
- install zopyx.convert either using easy_install or by downloading the sources
- $XFC_DIR must be set and point to the root of your XFC installation directory
- $XINC_HOME must be set and to point to the root of your XINC installation directory
Subversion repository:
----------------------
- http://svn-public.zopyx.com/viewvc/python-projects/zopyx.convert/trunk/
Usage:
------
> from zopyx.convert import Converter
> C = Convert('/path/to/some/file.html')
> pdf_filename = C('pdf')
> rtf_filename = C('rtf')
> pdt_filename = C('odt')
> wml_filename = C('wml')
> docx_filename = C('docx')
A very simple command-line converter is also available:
> xslfo-convert --format rtf --output foo.rtf sample.html
How zopyx.convert works internally:
-----------------------------------
- The source HTML file is converted to XHTML using mxTidy
- the XHTML file is converted to FO using the great "csstoxslfo" converter
written by Werner Donne.
- the FO file is passed either to the external XINC or XFC converter to
generated the desired output format
- all converters are based on Java technology make the conversion solution
highly portable across operating system (including Windows)
Limitations:
------------
- Works currently only on Linux/Unix, no Windows support so far
- no image support right now (exceptions will be raised)
Why XINC/XFC and not FOP?
-------------------------
zopyx.convert is build on the commercial converters XINC/XFC because these
converters *just work*. Depending on your needs to must make your choice
between the several available additions. Why not Apache FOP? FOP has been
evaluated in 2004 for the conversion to RTF/PDF and it was pretty much unusable
at that time. Now in 2007 Apache FOP reached version 0.9.3 thinks are looking
better. However open formats like ODT (Open-Office) and DOCX (Microsoft Office
2007) have come up and need to be supported. XFC fills the gap by supporting
RTF, ODT, DOCX and WML.
Author
======
zopyx.convert was written by Andreas Jung for ZOPYX Ltd. & Co. KG, Tuebingen, Germany.
License
=======
zopyx.convert is published under the Lesser GNU Public License V 2.1 (LGPL 2.1).
See LICENSE.txt.
Contact
=======
Andreas Jung,
E-mail: info at zopyx dot com
Web: http://www.zopyx.com
Changes:
========
0.4.4 (06.07.2007)
- using logging module
0.4.3 (05.07.2007)
- html2fo: using ElementTree for most FO modifications
0.4.2 (30.06.2007)
- converting page-break-after: always back into break-after: page
0.4.1 (24.06.2007):
- various fixes
0.4.0 (24.06.2007):
- added zope interfaces
- converters are now classes
- added unittests
0.3.1 (18.06.2007):
- html2fo() and the converter constructor got a new 'encoding'
parameter in order to specify the input encoding of the
HTML file. This parameter will be passed down to Tidy in order
to perform a proper conversion of non-ascii characters.
0.3.0 (unreleased):
- using subprocess module of Python
- new Convert() class for high-level XSLFO access
- logger added
- better checks for XINC, XFC
- updated documentation
0.2.0 (16.06.2007):
- PDF support added
- command line interface added
- mxTidy integration
0.1.0 (16.06.2007):
- initial release
# zopyx.convert - XSL-FO related functionalities
#
# (C) 2007, ZOPYX Ltd & Co. KG, Tuebingen, Germany
##########################################################################
A Python interface to XSL-FO libraries.
The packages helps to convert HTML to PDF, RTF, ODT, DOCX and WML using
XSL-FO technology.
Requirements:
-------------
- Java 1.4.0 or higher (1.5.X or 1.6.X are preferred)
- csstoxslfo (included)
- XFC-4.0 (www.xmlmind.com) for PDF support
- XINC 2.0 (www.lunasil.com) for ODT, RTF, DOCX, WML support
- mxTidy (egenix-experimental package from www.egenix.com)
Installation:
-------------
- install zopyx.convert either using easy_install or by downloading the sources
- $XFC_DIR must be set and point to the root of your XFC installation directory
- $XINC_HOME must be set and to point to the root of your XINC installation directory
Subversion repository:
----------------------
- http://svn-public.zopyx.com/viewvc/python-projects/zopyx.convert/trunk/
Usage:
------
> from zopyx.convert import Converter
> C = Convert('/path/to/some/file.html')
> pdf_filename = C('pdf')
> rtf_filename = C('rtf')
> pdt_filename = C('odt')
> wml_filename = C('wml')
> docx_filename = C('docx')
A very simple command-line converter is also available:
> xslfo-convert --format rtf --output foo.rtf sample.html
How zopyx.convert works internally:
-----------------------------------
- The source HTML file is converted to XHTML using mxTidy
- the XHTML file is converted to FO using the great "csstoxslfo" converter
written by Werner Donne.
- the FO file is passed either to the external XINC or XFC converter to
generated the desired output format
- all converters are based on Java technology make the conversion solution
highly portable across operating system (including Windows)
Limitations:
------------
- Works currently only on Linux/Unix, no Windows support so far
- no image support right now (exceptions will be raised)
Why XINC/XFC and not FOP?
-------------------------
zopyx.convert is build on the commercial converters XINC/XFC because these
converters *just work*. Depending on your needs to must make your choice
between the several available additions. Why not Apache FOP? FOP has been
evaluated in 2004 for the conversion to RTF/PDF and it was pretty much unusable
at that time. Now in 2007 Apache FOP reached version 0.9.3 thinks are looking
better. However open formats like ODT (Open-Office) and DOCX (Microsoft Office
2007) have come up and need to be supported. XFC fills the gap by supporting
RTF, ODT, DOCX and WML.
Author
======
zopyx.convert was written by Andreas Jung for ZOPYX Ltd. & Co. KG, Tuebingen, Germany.
License
=======
zopyx.convert is published under the Lesser GNU Public License V 2.1 (LGPL 2.1).
See LICENSE.txt.
Contact
=======
Andreas Jung,
E-mail: info at zopyx dot com
Web: http://www.zopyx.com
Changes:
========
0.4.4 (06.07.2007)
- using logging module
0.4.3 (05.07.2007)
- html2fo: using ElementTree for most FO modifications
0.4.2 (30.06.2007)
- converting page-break-after: always back into break-after: page
0.4.1 (24.06.2007):
- various fixes
0.4.0 (24.06.2007):
- added zope interfaces
- converters are now classes
- added unittests
0.3.1 (18.06.2007):
- html2fo() and the converter constructor got a new 'encoding'
parameter in order to specify the input encoding of the
HTML file. This parameter will be passed down to Tidy in order
to perform a proper conversion of non-ascii characters.
0.3.0 (unreleased):
- using subprocess module of Python
- new Convert() class for high-level XSLFO access
- logger added
- better checks for XINC, XFC
- updated documentation
0.2.0 (16.06.2007):
- PDF support added
- command line interface added
- mxTidy integration
0.1.0 (16.06.2007):
- initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zopyx.convert-0.4.4.tar.gz
(370.2 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
zopyx.convert-0.4.4-py2.5.egg
(387.1 kB
view details)
zopyx.convert-0.4.4-py2.4.egg
(387.3 kB
view details)
File details
Details for the file zopyx.convert-0.4.4.tar.gz.
File metadata
- Download URL: zopyx.convert-0.4.4.tar.gz
- Upload date:
- Size: 370.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
325f6bdbe63de1028fb9314488096deee33cb0cc244d65214b14bb29265cb84b
|
|
| MD5 |
2bd896df01ee5ab2ebfe5c9f023b92bd
|
|
| BLAKE2b-256 |
d411ab0b2fb590ea441c9244eed68e167841274ce38437f86b415d9d564ab07b
|
File details
Details for the file zopyx.convert-0.4.4-py2.5.egg.
File metadata
- Download URL: zopyx.convert-0.4.4-py2.5.egg
- Upload date:
- Size: 387.1 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffec762df1d3411eb95ba9a79d61e5eb982de0db327b0c8491adfdd55d0d7cd5
|
|
| MD5 |
537eca4ffb7078a2b9c973b6ec8034cc
|
|
| BLAKE2b-256 |
3b0db2e7dc5c7cffbe537b19dae113857de202bb34727174d7ca09fa3b82ece1
|
File details
Details for the file zopyx.convert-0.4.4-py2.4.egg.
File metadata
- Download URL: zopyx.convert-0.4.4-py2.4.egg
- Upload date:
- Size: 387.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eeae0cc5d47df86da97a58e6a55f68f5a579dbd190d3bd463bcd063edc9b9db4
|
|
| MD5 |
fa610b2161ec08cb4f5710eb123245c8
|
|
| BLAKE2b-256 |
f0b40e6c5975405c7482d2bedf9dd0b9eb29012cd0acc4662a20a649887afeb9
|