From 2dd4aea0f8e76ef0ebf283ffde0de7a5c994881b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AF=92=E5=BD=B1=E5=B3=B0?= <1499263074@qq.com> Date: Tue, 24 May 2022 23:58:42 +0800 Subject: [PATCH] =?UTF-8?q?macOS=E4=B8=8B=E6=9C=89=E5=85=B3word=E7=9A=84?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E6=93=8D=E4=BD=9C=E4=B8=ADcreatepdf?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BF=AE=E6=94=B9=E4=B8=BApandoc=E5=BA=93?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contributors/han_ying_feng/office/word.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contributors/han_ying_feng/office/word.py diff --git a/contributors/han_ying_feng/office/word.py b/contributors/han_ying_feng/office/word.py new file mode 100644 index 0000000..1bfe749 --- /dev/null +++ b/contributors/han_ying_feng/office/word.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- + +############################################# +# File Name: word.py +# Author: han_ying_feng +# Mail: gyuanhao@163.com +# Created Time: 2022年05月24日23:52:13 +# Description: macOS下有关word的自动化操作 +############################################# +from pypandoc import convert_file + + +def createpdf(wordPath, pdfPath): + convert_file(wordPath, 'pdf', pdfPath) -- Gitee