如果想使用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
# python setup.py install
</pre><span style="color: rgb(17, 17, 17); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 23.3999996185303px;">3. 安装reportlab,从官网下载(区分商业版本和社区版本)</span><p></p><p style="margin: 10px auto; padding-top: 0px; padding-bottom: 0px; color: rgb(17, 17, 17); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 23.3999996185303px;"><span style="color: rgb(17, 17, 17); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 23.3999996185303px;"></span></p><pre name="code" class="python"># tar -zxvf reportlab-2.5.tar.gz
# cd reportlab-2.5
# python setup.py install