PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
PDF 转 Word 是一种将 PDF 格式文件转换为可编辑的 Word 格式文件的操作。通过将 PDF 转换为 Word 文件,您可以轻松地编辑、修改文本、添加、删除文字或图片,轻松调整布局和格式等。
以下是完整的示例代码,演示了将 PDF 文档转换为 docx 文档。
input_file_path = "***"
password = "***"
output_file_name = "***"
word_options = ConvertOptions()
error = CPDFConversion.start_pdf_to_word(input_file_path, password, output_file_name, word_options)当文档包含复杂公式并希望保持输出文档视觉一致性时,可启用 formula_to_image 选项。
word_options = ConvertOptions()
word_options.formula_to_image = True
error = CPDFConversion.start_pdf_to_word("word.pdf", "", "output.docx", word_options)