๐ Word API Reference
This page is currently only available in Chinese. Please switch to ็ฎไฝไธญๆ for the full content.
๐ Word API Reference
Sub-package:
poword| Install:pip install powordImport:import officeorimport poword
Function Overviewโ
| Function | Description |
|---|---|
docx2pdf | Word to PDF (batch supported) |
merge4docx | Merge multiple Word files |
doc2docx | Doc to Docx |
docx2doc | Docx to Doc |
docx4imgs | Extract images from Word |
docx2pdfโ
Convert Word documents to PDF. Supports a single file or batch conversion of a whole folder.
office.word.docx2pdf(path, output_path=None)
import office
# Single file
office.word.docx2pdf(
path='document.docx',
output_path='./pdf_output/'
)
# Batch convert
office.word.docx2pdf(
path='./my_documents/',
output_path='./pdf_output/'
)
merge4docxโ
Merge multiple Docx files into one.
office.word.merge4docx(
input_path,
output_path,
new_word_name='merge4docx'
)
doc2docxโ
Doc to Docx.
office.word.doc2docx(
input_path='legacy.doc',
output_path='./output/',
output_name='modern_version'
)
docx2docโ
Docx to Doc.
office.word.docx2doc(
input_path='modern.docx',
output_path='./output/',
output_name='legacy_version'
)
docx4imgsโ
Extract images from a Word document.
office.word.docx4imgs(
word_path='document_with_images.docx',
img_path='./extracted_images/'
)
Related Resourcesโ
- ๐ Usage Guide โ
- ๐ฆ PyPI: poword
AI ๅๅ
ฌๆ็่ฏพ
35 ่ฎฒ AI ่ชๅจๅๅๅ
ฌๅฎๆ่ฏพ็จ Python + AI ๅค็ ExcelใWordใPDFใ้ฎไปถ็ญๅๅ
ฌๅบๆฏใ
ๅปๅญฆไน