(编辑:jimmy 日期: 2025/11/5 浏览:2)
def to_pdf(): import pdfkit htmls = [] for root, dirs, files in os.walk('.'): for name in files: if name.endswith(".html"): print(name) try: pdfkit.from_file(name, 'pdf/'+name.replace('.html', '')+'.pdf') except Exception as e: print(e)


