Aspose.Words for Python is a Document Processing library that allows developers to work with documents in many popular formats without needing Office Automation.
Project description
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Try our free online Apps demonstrating some of the most popular Aspose.Words functionality.
Aspose.Words for Python is a powerful on-premise class library that can be used for numerous document processing tasks. It enables developers to enhance their own applications with features such as generating, modifying, converting, rendering, and printing documents, without relying on third-party applications, for example, Microsoft Word, or automation.
Word API Features
The following are some popular features of Aspose.Words for Python:
- Aspose.Words can be used to develop applications for a vast range of operating systems such as Windows, Linux or MacOS X.
- Comprehensive document import and export with 35+ supported file formats. This allows users to convert documents from one popular format to another, for example, from DOCX into PDF or Markdown, or from PDF into various Word formats.
- Programmatic access to the formatting properties of all document elements. For example, using Aspose.Words users can split a document into parts or compare two documents.
- High fidelity rendering of document pages. For example, if it is needed to render a document as in Microsoft Word, Aspose.Words will successfully cope with this task.
- Generate reports with Mail Merge, which allows filling in merge templates with data from various sources to create merged documents.
- LINQ Reporting Engine to fetch data from databases, XML, JSON, OData, external documents, and much more.
Supported Document Formats
Aspose.Words for Python supports a wide range of formats for loading and saving documents, some of them are listed below: Microsoft Word: DOC, DOT, DOCX, DOTX, DOTM, FlatOpc, FlatOpcMacroEnabled, FlatOpcTemplate, FlatOpcTemplateMacroEnabled, RTF, WordML, DocPreWord60 OpenDocument: ODT, OTT Web: HTML, MHTML Markdown: MD Markup: XamlFixed, HtmlFixed, XamlFlow, XamlFlowPack Fixed Layout: PDF, XPS, OpenXps Image: SVG, TIFF, PNG, BMP, JPEG, GIF Metafile: EMF Printer: PCL, PS Text: TXT eBook: MOBI, CHM, EPUB
Platform Independence
Aspose.Words for Python can be used to develop applications for a vast range of operating systems, such as Windows, Linux and MacOS X, where Python 3.5 or later is installed. You can build both 32-bit and 64-bit Python applications.
Get Started
Ready to give Aspose.Words for Python a try?
Simply run pip install aspose-words
from the Console to fetch the package.
If you already have Aspose.Words for Python and want to upgrade the version, please run pip install --upgrade aspose-words
to get the latest version.
You can run the following snippets in your environment to see how Aspose.Words works, or check out the GitHub Repository or Aspose.Words for Python Documentation for other common use cases.
Using Python to Create a DOCX File from Scratch
Aspose.Words for Python allows you to create a new blank document and add content to this document.
import aspose.words as aw
# Create a blank document.
doc = aw.Document()
# Use a document builder to add content to the document.
builder = aw.DocumentBuilder(doc)
# Write a new paragraph in the document with the text "Hello World!".
builder.writeln("Hello, World!")
# Save the document in DOCX format. Save format is automatically determined from the file extension.
doc.save("output.docx")
Using Python to Convert a Word Document to HTML
Aspose.Words for Python also allows you to convert Microsoft Word formats to PDF, XPS, Markdown, HTML, JPEG, TIFF, and other file formats. The following snippet demonstrates the conversion from DOCX to HTML:
import aspose.words as aw
# Load the document from the disc.
doc = aw.Document("TestDocument.docx")
# Save the document to HTML format.
doc.save("output.html")
Using Python to Import PDF and Save as a DOCX File
In addition, you can import a PDF document into your Python application and export it as a DOCX format file without the need to install Microsoft Word:
import aspose.words as aw
# Load the PDF document from the disc.
doc = aw.Document("TestDocument.pdf")
# Save the document to DOCX format.
doc.save("output.docx")
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for aspose_words-24.10.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a131573f27dc8e3f36d7b34f7b1225b25ebf0c4a9507f85c8557433c614ee2cb |
|
MD5 | 6643a2f05a6da630dc84998b7be730b3 |
|
BLAKE2b-256 | a0c346055de3cf258784853fffbca07c9b3535d51b05fa4552fd16f11f779e38 |
Hashes for aspose_words-24.10.0-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637a5862dfe9d24953466322cfd207fd5ca75d65bc76fd337c0c01b83152fc25 |
|
MD5 | 708f468678e6cbb916109d9040beffbb |
|
BLAKE2b-256 | 24f139f944d913f6dac9e035fd1ad2929f66c1cc91fcb2af21435f296252e8b4 |
Hashes for aspose_words-24.10.0-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9cf23a925486da080733a6f33a2772cc4ada70a04df7fdb353834fa398c9f0f |
|
MD5 | 4cf534cd64d856df9f3c3ecba4387d3f |
|
BLAKE2b-256 | aa5cc3d1254ef741e69f74086c32ad0ddd26eb3c026abba6f7e51418d0a3eb89 |
Hashes for aspose_words-24.10.0-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b940282d334073b182e1120f218226fc80589fa8cd35e1ad58f8899e94d2749 |
|
MD5 | fa71a38ad050f985173adcacd7465106 |
|
BLAKE2b-256 | bf99f0ddbd19c82304e22540e3b4f6a7d2f5f74da8907fe9db74dd956ba1d72e |
Hashes for aspose_words-24.10.0-py3-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18927d58a02319abfc62168b32fa04715a204e382661c45ad7f72e0de784f291 |
|
MD5 | 9bdf8885c7122c3fd22f5e39a2ce5881 |
|
BLAKE2b-256 | a5c8cd38d052a145cd49a1d22cdf14835420aa22dc74e8f5d781eb3648220fbd |