# File Conversion API
[![banner](https://raw.githubusercontent.com/groupdocs/groupdocs.github.io/master/img/banners/groupdocs-conversion-python-net-banner.png)](https://releases.groupdocs.com/conversion/python-net/)
[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://references.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
GroupDocs.Conversion for Python via .NET is a document conversion API that lets you easily convert the most popular file formats, including DOCX, XLSX, PPTX, PDF, CAD drawings, and many more. It preserves layout and formatting while offering customization options for each format.
## Features
- **Wide Format Support**: Supports over 10,000 conversion pairs across popular formats like Microsoft Office, PDF, HTML, and more.
- **Flexible Conversion Options**: Convert entire documents, specific pages, page ranges, or files within document containers such as compressed files.
- **Format Detection**: Automatically detects the format of input files.
## Supported File Formats
GroupDocs.Conversion supports a wide range of file formats. For a complete list, see the [full list of supported formats](http://docs.groupdocs.com/conversion/python-net/supported-file-formats/).
* **Microsoft Office** (Word, Excel, PowerPoint)
* **PDF** (Standard PDFs, PDF/A)
* **OpenDocument** (ODT, ODS, ODP)
* **Images** (JPEG, PNG, TIFF)
* **Email** (EML, MSG)
* **eBook** (EPUB, MOBI)
* **Text/Markdown** (TXT, MD)
* **HTML/Web** (HTML, MHTML)
* **AutoCAD** (DWG, DXF)
* **3D Models** (OBJ, 3DS)
## Get Started
Ensure that [Python 3.9](https://www.python.org/downloads/) and the [.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) runtime (or higher) are installed on your system.
To install the package, run:
```bash
pip install groupdocs-conversion-net
```
If you already have the package installed and want to update to the latest version, run:
```bash
pip install --upgrade groupdocs-conversion-net
```
Here are some common use cases to get started.
### Example 1: Convert a Document to Another Format
The following example demonstrates how to convert a DOCX file to PDF:
```python
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions
def convert_document_to_another_format():
# Instantiate Converter with the input document
with Converter("./business-plan.docx") as converter:
# Instantiate convert options to define the output format
pdf_convert_options = PdfConvertOptions()
# Convert the input document to PDF
converter.convert("./business-plan.pdf", pdf_convert_options)
if __name__ == "__main__":
convert_document_to_another_format()
```
### Example 2: Convert All Pages of a Document
The following example demonstrates how to convert each slide in a PPTX presentation to a PNG image and save the output images to a specified folder.
```python
from groupdocs.conversion import Converter
from groupdocs.conversion.filetypes import ImageFileType
from groupdocs.conversion.options.convert import ImageConvertOptions
def convert_all_document_pages():
# Instantiate Converter with the input document
with Converter("./basic-presentation.pptx") as converter:
# Instantiate convert options
png_convert_options = ImageConvertOptions()
# Define the output format as PNG
png_convert_options.format = ImageFileType.PNG
# Convert all pages and save to the output folder
converter.convert_by_page("./converted-pages", png_convert_options)
if __name__ == "__main__":
convert_all_document_pages()
```
### Example 3: Convert Files Within Document Container
The following example demonstrates how to convert each compressed file in ZIP archive to PDF:
```python
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions
def convert_files_within_document_container():
# Instantiate Converter with the input document
with Converter("./compressed.zip") as converter:
# Instantiate convert options
pdf_convert_options = PdfConvertOptions()
# Extract, convert and save output files in PDF format
converter.convert_multiple("./converted-files", pdf_convert_options)
if __name__ == "__main__":
convert_files_within_document_container()
```
## More Resources
Find more details and examples in the [GroupDocs.Conversion for Python via .NET documentation](http://docs.groupdocs.com/conversion/python-net/).
We also provide **GroupDocs.Conversion** packages for other platforms:
* [**GroupDocs.Conversion for .NET**](https://products.groupdocs.com/conversion/net/)
* [**GroupDocs.Conversion for Java**](https://products.groupdocs.com/conversion/java/)
* [**GroupDocs.Conversion for Node.js via Java**](https://products.groupdocs.com/conversion/nodejs-java/)
---
[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://references.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
Raw data
{
"_id": null,
"home_page": "https://products.groupdocs.com/conversion",
"name": "groupdocs-conversion-net",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.9",
"maintainer_email": null,
"keywords": "convert, file, document, pdf, docx, xlsx, pptx, html, png, word, excel, powerpoint",
"author": "GroupDocs",
"author_email": null,
"download_url": null,
"platform": "win_amd64,win32,macos_x86_64,macos_arm64",
"description": "# File Conversion API\r\n\r\n[![banner](https://raw.githubusercontent.com/groupdocs/groupdocs.github.io/master/img/banners/groupdocs-conversion-python-net-banner.png)](https://releases.groupdocs.com/conversion/python-net/)\r\n\r\n[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://references.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)\r\n\r\nGroupDocs.Conversion for Python via .NET is a document conversion API that lets you easily convert the most popular file formats, including DOCX, XLSX, PPTX, PDF, CAD drawings, and many more. It preserves layout and formatting while offering customization options for each format. \r\n\r\n## Features\r\n\r\n- **Wide Format Support**: Supports over 10,000 conversion pairs across popular formats like Microsoft Office, PDF, HTML, and more.\r\n- **Flexible Conversion Options**: Convert entire documents, specific pages, page ranges, or files within document containers such as compressed files.\r\n- **Format Detection**: Automatically detects the format of input files.\r\n\r\n## Supported File Formats\r\n\r\nGroupDocs.Conversion supports a wide range of file formats. For a complete list, see the [full list of supported formats](http://docs.groupdocs.com/conversion/python-net/supported-file-formats/).\r\n\r\n* **Microsoft Office** (Word, Excel, PowerPoint)\r\n* **PDF** (Standard PDFs, PDF/A)\r\n* **OpenDocument** (ODT, ODS, ODP)\r\n* **Images** (JPEG, PNG, TIFF)\r\n* **Email** (EML, MSG)\r\n* **eBook** (EPUB, MOBI)\r\n* **Text/Markdown** (TXT, MD)\r\n* **HTML/Web** (HTML, MHTML)\r\n* **AutoCAD** (DWG, DXF)\r\n* **3D Models** (OBJ, 3DS)\r\n\r\n## Get Started\r\n\r\nEnsure that [Python 3.9](https://www.python.org/downloads/) and the [.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) runtime (or higher) are installed on your system.\r\n\r\nTo install the package, run:\r\n\r\n```bash\r\npip install groupdocs-conversion-net\r\n```\r\n\r\nIf you already have the package installed and want to update to the latest version, run:\r\n\r\n```bash\r\npip install --upgrade groupdocs-conversion-net\r\n```\r\n\r\nHere are some common use cases to get started.\r\n\r\n### Example 1: Convert a Document to Another Format\r\n\r\nThe following example demonstrates how to convert a DOCX file to PDF:\r\n\r\n```python\r\nfrom groupdocs.conversion import Converter\r\nfrom groupdocs.conversion.options.convert import PdfConvertOptions\r\n\r\ndef convert_document_to_another_format():\r\n # Instantiate Converter with the input document \r\n with Converter(\"./business-plan.docx\") as converter:\r\n # Instantiate convert options to define the output format\r\n pdf_convert_options = PdfConvertOptions()\r\n \r\n # Convert the input document to PDF\r\n converter.convert(\"./business-plan.pdf\", pdf_convert_options) \r\n\r\nif __name__ == \"__main__\":\r\n convert_document_to_another_format()\r\n```\r\n\r\n### Example 2: Convert All Pages of a Document\r\n\r\nThe following example demonstrates how to convert each slide in a PPTX presentation to a PNG image and save the output images to a specified folder.\r\n\r\n```python\r\nfrom groupdocs.conversion import Converter\r\nfrom groupdocs.conversion.filetypes import ImageFileType\r\nfrom groupdocs.conversion.options.convert import ImageConvertOptions\r\n\r\ndef convert_all_document_pages():\r\n # Instantiate Converter with the input document \r\n with Converter(\"./basic-presentation.pptx\") as converter:\r\n # Instantiate convert options \r\n png_convert_options = ImageConvertOptions()\r\n # Define the output format as PNG\r\n png_convert_options.format = ImageFileType.PNG\r\n \r\n # Convert all pages and save to the output folder\r\n converter.convert_by_page(\"./converted-pages\", png_convert_options) \r\n\r\nif __name__ == \"__main__\":\r\n convert_all_document_pages()\r\n```\r\n\r\n### Example 3: Convert Files Within Document Container\r\n\r\nThe following example demonstrates how to convert each compressed file in ZIP archive to PDF:\r\n\r\n```python\r\nfrom groupdocs.conversion import Converter\r\nfrom groupdocs.conversion.options.convert import PdfConvertOptions\r\n\r\ndef convert_files_within_document_container():\r\n # Instantiate Converter with the input document \r\n with Converter(\"./compressed.zip\") as converter:\r\n # Instantiate convert options \r\n pdf_convert_options = PdfConvertOptions()\r\n\r\n # Extract, convert and save output files in PDF format\r\n converter.convert_multiple(\"./converted-files\", pdf_convert_options) \r\n\r\nif __name__ == \"__main__\":\r\n convert_files_within_document_container()\r\n```\r\n\r\n## More Resources\r\n\r\nFind more details and examples in the [GroupDocs.Conversion for Python via .NET documentation](http://docs.groupdocs.com/conversion/python-net/).\r\n\r\nWe also provide **GroupDocs.Conversion** packages for other platforms:\r\n* [**GroupDocs.Conversion for .NET**](https://products.groupdocs.com/conversion/net/)\r\n* [**GroupDocs.Conversion for Java**](https://products.groupdocs.com/conversion/java/)\r\n* [**GroupDocs.Conversion for Node.js via Java**](https://products.groupdocs.com/conversion/nodejs-java/)\r\n\r\n---\r\n\r\n[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://references.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)\r\n",
"bugtrack_url": null,
"license": "Other/Proprietary License",
"summary": "File converter for the most commonly used formats, including DOCX, PDF, CAD, and many more.",
"version": "24.11",
"project_urls": {
"Homepage": "https://products.groupdocs.com/conversion"
},
"split_keywords": [
"convert",
" file",
" document",
" pdf",
" docx",
" xlsx",
" pptx",
" html",
" png",
" word",
" excel",
" powerpoint"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "360a907ea32b0ff2b7ab8d6bdba2b17c77542a3d1c09c00f505680aa2b07542e",
"md5": "193bbe74cb5e2f88a5d519af38d6358a",
"sha256": "0257dc7aa1b8fb1d06353fb0cb9bc9cd372438d957e0cfba5e918cf772cea17f"
},
"downloads": -1,
"filename": "groupdocs_conversion_net-24.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "193bbe74cb5e2f88a5d519af38d6358a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.9",
"size": 3190,
"upload_time": "2024-11-11T14:59:24",
"upload_time_iso_8601": "2024-11-11T14:59:24.883262Z",
"url": "https://files.pythonhosted.org/packages/36/0a/907ea32b0ff2b7ab8d6bdba2b17c77542a3d1c09c00f505680aa2b07542e/groupdocs_conversion_net-24.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 14:59:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "groupdocs-conversion-net"
}