=======================================
A Python interface to XSL-FO libraries.
=======================================
The zopyx.convert package helps you to convert HTML to PDF, RTF, ODT, DOCX and
WML using XSL-FO technology.
Requirements
============
- Java 1.5.0 or higher
- `csstoxslfo`__ (included)
__ http://www.re.be/css2xslfo
- `XFC-4.0`__ (XMLMind) for ODT, RTF, DOCX and WML support
__ http://www.xmlmind.com/foconverter
- `XINC 2.0`__ (Lunasil) for PDF support (commercial)
__ http://www.lunasil.com/products.html
- or `FOP 0.94`__ (Apache project) for PDF support (free)
__ http://xmlgraphics.apache.org/fop/download.html#dist-type
- `BeautifulSoup`__
__ http://www.crummy.com/software/BeautifulSoup/
- `ElementTree`__
__ http://effbot.org/zone/element-index.html
Installation
============
- install **zopyx.convert** either using easy_install or by downloading the sources from the Python Cheeseshop
- the environment variable *$XFC_DIR* must be set and point to the root of your XFC installation directory
- the environment variable *$XINC_HOME* must be set and to point to the root of your XINC installation directory
- the environment variable *$FOP_HOME* must be set and point to the root of yourr FOP installation directory
Supported platforms
===================
Windows, Unix
Subversion repository
=====================
- http://svn-public.zopyx.com/viewvc/python-projects/zopyx.convert/trunk/
Usage
=====
Some examples from the Python command-line::
from zopyx.convert import Converter
C = Convert('/path/to/some/file.html')
pdf_filename = C('pdf') # using XINC
pdf2_filename = C('pdf2') # using FOP
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
`xslfo-convert` has a --test option that will convert some
sample HTML. If everything is ok then you should see something like that::
>xslfo-convert --test
Entering testmode
pdf: /tmp/tmpuOb37m.html -> /tmp/tmpuOb37m.pdf
rtf: /tmp/tmpuOb37m.html -> /tmp/tmpuOb37m.rtf
docx: /tmp/tmpuOb37m.html -> /tmp/tmpuOb37m.docx
odt: /tmp/tmpuOb37m.html -> /tmp/tmpuOb37m.odt
wml: /tmp/tmpuOb37m.html -> /tmp/tmpuOb37m.wml
pdf: /tmp/tmpZ6PGo9.html -> /tmp/tmpZ6PGo9.pdf
rtf: /tmp/tmpZ6PGo9.html -> /tmp/tmpZ6PGo9.rtf
docx: /tmp/tmpZ6PGo9.html -> /tmp/tmpZ6PGo9.docx
odt: /tmp/tmpZ6PGo9.html -> /tmp/tmpZ6PGo9.odt
wml: /tmp/tmpZ6PGo9.html -> /tmp/tmpZ6PGo9.wml
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)
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
=======
| ZOPYX Ltd. & Co. KG
| c/o Andreas Jung,
| Charlottenstr. 37/1
| D-72070 Tuebingen, Germany
| E-mail: info at zopyx dot com
| Web: http://www.zopyx.com
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | zopyx.convert-1.1.1.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 82 浏览量
2022-01-17
16:10:52
上传
评论
收藏 347KB GZ 举报
温馨提示
共37个文件
py:18个
txt:11个
pkg-info:2个
资源来自pypi官网。 资源全名:zopyx.convert-1.1.1.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
zopyx.convert-1.1.1.tar.gz (37个子文件)
zopyx.convert-1.1.1
PKG-INFO 8KB
bootstrap.py 2KB
src
zopyx.convert.egg-info
PKG-INFO 8KB
requires.txt 10B
not-zip-safe 1B
SOURCES.txt 1KB
entry_points.txt 58B
top_level.txt 6B
namespace_packages.txt 6B
dependency_links.txt 1B
__init__.py 15B
zopyx
convert
README.txt 3KB
CHANGES.txt 2KB
cli.py 2KB
logger.py 296B
fo2pdf.py 1KB
html2fo.py 5KB
tests
testConverters.py 2KB
data
test2.html 52KB
__init__.py 14B
test1.html 825B
__init__.py 252B
fo2xfc.py 2KB
util.py 1KB
version.txt 6B
interfaces.py 1KB
__init__.py 827B
convert.py 3KB
header.txt 252B
lib
csstoxslfo
css2xslfo.jar 350KB
fo2fop.py 1KB
config.py 332B
LICENSE.txt 26KB
__init__.py 56B
setup.cfg 59B
setup.py 2KB
buildout.cfg 136B
共 37 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功