Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

aspose_words-24.1.0-py3-none-win_amd64.whl (62.6 MB view details)

Uploaded Python 3Windows x86-64

aspose_words-24.1.0-py3-none-win32.whl (55.6 MB view details)

Uploaded Python 3Windows x86

aspose_words-24.1.0-py3-none-manylinux1_x86_64.whl (79.2 MB view details)

Uploaded Python 3

aspose_words-24.1.0-py3-none-macosx_11_0_arm64.whl (61.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

aspose_words-24.1.0-py3-none-macosx_10_14_x86_64.whl (77.0 MB view details)

Uploaded Python 3macOS 10.14+ x86-64

File details

Details for the file aspose_words-24.1.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for aspose_words-24.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1eb73be8d0285250d68056c16b892e084e6c302e76bbb3bf39c66a601793afe1
MD5 4742142b3b9fc167c1010d225e404db0
BLAKE2b-256 980be29c3745871e973bb0409ce27a853f85e792746243c8732788986b0f6ec6

See more details on using hashes here.

File details

Details for the file aspose_words-24.1.0-py3-none-win32.whl.

File metadata

  • Download URL: aspose_words-24.1.0-py3-none-win32.whl
  • Upload date:
  • Size: 55.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for aspose_words-24.1.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 4bbb354bd1790e13f59b6ca0b9999aa0fe6deb5429111396a853ffb8eb19a38e
MD5 4903e7362a29bdda7aef220a9b4778b4
BLAKE2b-256 dfb61592392b7585fd7b45f2b367096d8c4e8ceabecf3f47650d67723d08652e

See more details on using hashes here.

File details

Details for the file aspose_words-24.1.0-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for aspose_words-24.1.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 88a08d72642a1a42fa7e47a2a614829663eefc62e696f497cb69dbec41fd21e6
MD5 d029f5db657c77ea9ec2ae71a664957d
BLAKE2b-256 6dfbb657424935757aaa2bc4746c4e893318ff6ec9dfe18d51682db3a604172f

See more details on using hashes here.

File details

Details for the file aspose_words-24.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aspose_words-24.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17225c693583c9c88f1c42db2e9e75bd031c13ce402224e6e35ed8ca84ce9a89
MD5 450ff120d70559e11680f247b2bb1336
BLAKE2b-256 8efbfe3566a5940704caec1a52e7b58471c17636ae843494592c0446ba9d5c2a

See more details on using hashes here.

File details

Details for the file aspose_words-24.1.0-py3-none-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for aspose_words-24.1.0-py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3a11fc3a99c75e2efc5d2915147b0d5e6a7bb37bc6a1a5e015ed24bfa05c4a43
MD5 4bab9cc423eca4dce6b694ae00c7054b
BLAKE2b-256 0614496f7ccb365b3230a309786687cd76b96a9030d14ff233dd7bf72b58e1cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page