---
title: "转换 Python 格式的文档"
---

轻松可靠地将文档从一种格式转换为另一种格式的能力是 Aspose.Words 的主要功能领域之一。这样的转换无非就是加载和保存操作的结合。

几乎您想要使用 Aspose.Words 执行的任何任务都涉及以某种格式加载或保存文档。如前面部分所述，[LoadFormat](https://reference.aspose.com/words/python-net/aspose.words/loadformat/) 枚举指定 Aspose.Words 支持的所有 *load* 或 *import* 格式，[SaveFormat](https://reference.aspose.com/words/python-net/aspose.words/saveformat/) 枚举指定 Aspose.Words 支持的所有 *save* 或 *export* 格式。因此，Aspose.Words 可以将文档从任何支持的加载格式转换为任何支持的保存格式。通常，这种转换需要几个阶段的计算。然而，从用户的角度来看，从一种文档格式到另一种文档格式的转换本身非常简单，只需两个步骤即可完成：

1. 使用 [Document](https://reference.aspose.com/words/python-net/aspose.words/document/) 对象的构造函数之一将文档加载到 [Document](https://reference.aspose.com/words/python-net/aspose.words/document/) 对象中。
1. 对 [Document](https://reference.aspose.com/words/python-net/aspose.words/document/) 对象调用 [save](https://reference.aspose.com/words/python-net/aspose.words/document/save/) 方法之一并指定所需的输出格式。

```

**在线尝试**

您可以使用我们的 [免费在线转换器](https://products.aspose.app/words/conversion) 工具尝试转换功能。

```

当前部分介绍了流行的转换，以及在加载和保存时使用某些格式组合的想法。使用本节的示例，您可以了解到转换过程本身是相当通用的，并且没有必要描述所有可能的选项，因为由于 [支持的文档格式](/words/zh/python-net/supported-document-formats/) 数量庞大，因此有数百个选项。

```

请注意，以下是最流行的转换组合，并非每个组合都链接到特定页面。出现这种情况是因为我们的文章没有为每对转换提供示例 - 几乎所有转换都非常相似。通过研究当前部分中的文章来确保这一点。

```

<div class="row">
		<div class="col-md-4">
				<h2>将 Word 转换为 PDF</h2>

								/words/python-net/convert-a-document-to-pdf/#converting-doc-or-docx-to-pdf - 将 DOC 转换为 PDF
								/words/python-net/convert-a-document-to-pdf/#converting-doc-or-docx-to-pdf - 将 DOCX 转换为 PDF
								和别的

				<h2>将图像转换为 PDF</h2>

								/words/python-net/convert-a-document-to-pdf/#convert-an-image-to-pdf - 将 JPG 转换为 PDF
								/words/python-net/convert-a-document-to-pdf/#convert-an-image-to-pdf - 将 TIFF 转换为 PDF
								和别的

				<h2>将 Web 格式转换为 PDF</h2>

								将 Markdown 转换为 PDF
								将 HTML 转换为 PDF
								将 MHT (MHTML) 转换为PDF
								和别的

				<h2>将其他格式转换为 PDF</h2>

								将 RTF 转换为 PDF
								将 ODT 转换为PDF
								将 TXT 转换为 PDF
								将 Mobi 转换为 PDF
								和别的

		<div class="col-md-4">
				<h2>将 PDF 转换为 Word</h2>

								/words/zh/python-net/convert-pdf-to-other-document-formats/ - 将 PDF 转换为其他文档格式
        将 PDF 转换为 DOC
								和别的

				<h2>将 PDF 转换为图像</h2>

								/words/zh/python-net/convert-a-document-to-an-image/ - 将文档转换为图像
        将 PDF 转换为 SVG
								和别的

				<h2>将 PDF 转换为 Web 格式</h2>

        将 PDF 转换为 Markdown
								将 PDF 转换为 HTML
								将 PDF 转换为 EPUB
								和别的

				<h2>将 PDF 转换为其他格式</h2>

								将 PDF 转换为 RTF
								将 PDF 转换为 XPS
								和别的

		<div class="col-md-4">
				<h2>将文档转换为图像</h2>

								/words/zh/python-net/convert-a-document-to-an-image/ - 将文档转换为图像
								/words/zh/python-net/convert-a-document-to-an-image/ - 将文档转换为图像
								和别的

				<h2>将文档转换为 Markdown</h2>

								/words/zh/python-net/convert-a-document-to-markdown/ - 将文档转换为 Markdown
								将 HTML 转换为 Markdown
								和别的

				<h2>将文档转换为 HTML</h2>

								/words/python-net/convert-a-document-to-html-mhtml-or-epub/#convert-a-document - 将 Word 转换为 HTML
								将 Markdown 转换为 HTML
								将 Mobi 转换为 EPUB
								和别的

