本文实例讲述了Python实现将doc转化pdf格式文档的方法。分享给大家供大家参考,具体如下:
#-*- coding:utf-8 -*-
# doc2pdf.py: python scr ipt to convert doc to pdf with bookmarks!
# Requires Office 2007 SP2
# Requires python for win32 extension
import sys, os
from win32com.client import Dis
在本地开发测试时,样式是没有问题的,将其部署到服务器后,发现转出的PDF格式不对,
在 odoo doc/howtos/backend.rst 文件中,看到提示
If it appears that your PDF report is missing the styles (i.e. the text
appears but the style/layout is different from the html version), probably
your wkh