https://1s1ksd.qlteacher.com/sd2024/lesson-case/4b6299f83f9e40b7a033d7bfa6d13c76/view?stId=sd2024xxczgz_05 求下载,PDF格式也行,有方法更好。 也行, 更好
这个是div.textlayer模块,我选择只有文字内容,不能复制表格格式。我用文心一言查了下方法,你打开链接看看去试下:https://yiyan.baidu.com/share/1Uv7wfBbme
htwl1023 发表于 2025-9-15 15:47 这个是div.textlayer模块,我选择只有文字内容,不能复制表格格式。我用文心一言查了下方法,你打开链接看 ... [color=]不懂下面的代码怎么用? 生成 PDF(需库支持) 使用 pdfkit 或 weasyprint 将 HTML 转换为 PDF: python import pdfkit html_content = """ Document Title This is a paragraph. NameAgeAlice25 """ # 保存为 PDF(需安装 wkhtmltopdf) pdfkit.from_string(html_content, 'document.pdf')