将文本文件转换为 PDF 文件。当用户提到文本转 PDF、txt 转 PDF、TXT 生成 PDF 时使用。
72
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
将文本文件转换为 PDF 文件
将文本文件(.txt)转换为 PDF 格式。
office/skills/pdf/txt2pdf/
from office.skills.pdf import txt2pdf
txt2pdf(
input_file='./test.txt',
output_file='./test.pdf'
)| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
input_file | str | 否 | - | 文本文件路径 |
output_file | str | 否 | 'txt2pdf.pdf' | 输出 PDF 文件路径 |
None
from office.skills.pdf import txt2pdf
txt2pdf(input_file='./article.txt', output_file='./article.pdf')https://www.python4office.cn/python-office/popdf/%E8%AF%BE%E7%A8%8B/3-txt2pdf/
office.api.pdf.txt2pdf
2b1996b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.