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 | 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 or Linux.
  • 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 and Linux, 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 | 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

aspose_words-22.6.0-py3-none-win_amd64.whl (53.0 MB view details)

Uploaded Python 3 Windows x86-64

aspose_words-22.6.0-py3-none-win32.whl (47.8 MB view details)

Uploaded Python 3 Windows x86

File details

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

File metadata

  • Download URL: aspose_words-22.6.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 53.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for aspose_words-22.6.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 475843b908fd0971dbc0a7c221c06c18e785161cc5bd19d7832acdddc327b0fa
MD5 87aa3caa4f5f9993ee191ce37e816b37
BLAKE2b-256 2d8108a41ff894dc33b949a712ec3c508d2d442859bbb2b72fbc08771eab05a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aspose_words-22.6.0-py3-none-win32.whl
  • Upload date:
  • Size: 47.8 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for aspose_words-22.6.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 c36e6497cfcf067abbf1f36a0bc43a713ab7cdb1343ca7b8cbf69f0fde32c243
MD5 f16bfe5ad98fa9d983d417587ab5218b
BLAKE2b-256 79c4bbde9d96446e79dfe9125aff3e8a7704f7a1ce98af71c45b1fa87995e039

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aspose_words-22.6.0-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 64.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for aspose_words-22.6.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 089eb654f4cc331b297ff866070d72813e8c67d323ed651a80a71cdabbbcfc4a
MD5 51b8004aeb7c7c60e042b026bd2ec5fa
BLAKE2b-256 a8b033aa70d19b6bb6ecc7fff6c3724955d0d7bd8310d4c2d9b25cb157164faa

See more details on using hashes here.

Supported by

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