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 Distribution

groupdocs-conversion-net-0.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

groupdocs_conversion_net-0.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file groupdocs-conversion-net-0.0.0.tar.gz.

File metadata

File hashes

Hashes for groupdocs-conversion-net-0.0.0.tar.gz
Algorithm Hash digest
SHA256 cbf8442761d25c8acb91ae520450fa93fd55103530b971387a97520a3e0839e4
MD5 5dba931dc693a2a306277aa0c6035cec
BLAKE2b-256 b5a484742f538d21378e667814bf0010012980eb09a5ec22b0047c4df3484361

See more details on using hashes here.

File details

Details for the file groupdocs_conversion_net-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for groupdocs_conversion_net-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63e41ed2930b29d980a0d3df700e777501354832f2447e1e56d2990be247317d
MD5 655845a5a7fd4644aa729bd6f52ddff1
BLAKE2b-256 13f87a843e3a4bb22cbd37c95a97cd3caf8c2fbb27daa6fb3b40e00c9a0220f2

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