如果想使用python将数据生成为pdf格式的文件,那么使用reportlab可能是个比较好的选择
1.安装python,在之前的文章中可以知晓我安装的是python2.7的版本
2.安装Python Imaging Library (PIL),它的用处是“The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.”详见其官方介绍
# tar -zxvf Imaging-1.1.7.tar.gz
# cd Imaging-1.1.7
# cd Imaging-1.1.7
# python setup.py install
3. 安装reportlab,从官网下载(区分商业版本和社区版本)
# tar -zxvf reportlab-2.5.tar.gz
# cd reportlab-2.5
# cd reportlab-2.5
# python setup.py install