XiaO

doc2pdf

XiaO / 2021-09-29


doc2docx

在 Terminal 中,使用 textutil 将 doc 文件 file.doc 转换为 docx 格式。

textutil -help # 查看 textutil 使用帮助
textutil -convert docx file.doc

docx2pdf

brew install pandoc # 格式转换工具
brew install --cask basictex # PDF 生成引擎

pandoc --help # 查看 pandoc 使用帮助
fc-list :lang=zh # 列出系统中的中文字体

pandoc -f docx -o output_file.pdf --pdf-engine=xelatex -V CJKmainfont='Kaiti SC' -V mainfont=Menlo file.docx