如何使用python编程在windows中将.tex文件转换为.pdf文件?
我有 .tex 文件,想在 Windows 中通过 python 代码生成 .pdf 文件
import pdflatex with open('my_file.tex', 'rb') as f: pdfl = pdflatex.PDFLaTeX.from_binarystring(f.read(), 'my_file' pdf, log, cp = pdfl.create_pdf()
参考:https://pypi.org/project/pdflatex/