多张图片合并到一个word文档

多张图片 合并 到 一个word文档

import aspose.words as aw

# Create a document

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

# Insert image

for i in range(5):
    filename = "j:/aa/" + str(i).strip() + ".png"
    builder.insert_image(filename)

# Save document

doc.save("document.docx")
posted @ 2023-12-19 11:31  冀未然  阅读(97)  评论(0)    收藏  举报