Skip to main content

File converter for the most commonly used formats, including DOCX, PDF, CAD, and many more.

Project description

File Conversion API

banner

Product Page | Docs | Demos | API Reference | Blog | Search | Free Support | 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.

  • 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 and the .NET 6 runtime (or higher) are installed on your system.

To install the package, run:

pip install groupdocs-conversion-net

If you already have the package installed and want to update to the latest version, run:

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:

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.

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:

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.

We also provide GroupDocs.Conversion packages for other platforms:


Product Page | Docs | Demos | API Reference | 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

groupdocs_conversion_net-24.12-py3-none-win_amd64.whl (220.3 MB view details)

Uploaded Python 3Windows x86-64

groupdocs_conversion_net-24.12-py3-none-win32.whl (214.4 MB view details)

Uploaded Python 3Windows x86

groupdocs_conversion_net-24.12-py3-none-macosx_11_0_arm64.whl (219.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

groupdocs_conversion_net-24.12-py3-none-macosx_10_14_x86_64.whl (229.1 MB view details)

Uploaded Python 3macOS 10.14+ x86-64

File details

Details for the file groupdocs_conversion_net-24.12-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for groupdocs_conversion_net-24.12-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c56b8d04f85ebb30eead9093ff5883a29b61f86858d6f3be03c775017615c848
MD5 d0f75b9148471c2531c5a895bd88b823
BLAKE2b-256 0719f94cbe0af9fb6626129a42007441c5903e3062b4f2dbd3a555c583e24aa0

See more details on using hashes here.

File details

Details for the file groupdocs_conversion_net-24.12-py3-none-win32.whl.

File metadata

File hashes

Hashes for groupdocs_conversion_net-24.12-py3-none-win32.whl
Algorithm Hash digest
SHA256 563f8dc0cd7968dc89352afd03d624e388cc2c2cf2f7228473c21c285e82ee0b
MD5 c014f9021425c59e7e28f50eeeb00fcf
BLAKE2b-256 4038342e4c9aaa522b66b21ab900c0e5bb67512aa299467f9d020172a11fed24

See more details on using hashes here.

File details

Details for the file groupdocs_conversion_net-24.12-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for groupdocs_conversion_net-24.12-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d505b23749930407f714f3ec63287802fd9fdfc69cf205ee780a6fe520bcb649
MD5 50e5d05fae1477a4fddfacec6fe8c32f
BLAKE2b-256 0da1d9f1bd4981c4688d2242228b3b65e268e83880548fcd5234739c104fc0e8

See more details on using hashes here.

File details

Details for the file groupdocs_conversion_net-24.12-py3-none-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for groupdocs_conversion_net-24.12-py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a8d43928cd14dc17733d98179ed745aa514b8505d07ba6620e255b434419b0f3
MD5 ca930a45d4d7575b32b918e522fdd05f
BLAKE2b-256 78ab99126273ceaca6c85a405574bce32d5d3fa67b2d1761edfab8b30d417c6d

See more details on using hashes here.

Supported by

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